diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-01-25 19:03:40 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-01-25 20:24:00 -0500 |
| commit | 29bc342af8527f9bada1d011b17d7fd87d4ebdad (patch) | |
| tree | 4e40b0d315bbc2c308888833df5bdab61cba1637 /implementation/codfns.md | |
| parent | d12d44dd0d6288ca7b41c113b21105abe107a367 (diff) | |
Editing
Diffstat (limited to 'implementation/codfns.md')
| -rw-r--r-- | implementation/codfns.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/implementation/codfns.md b/implementation/codfns.md index 2eabad25..d8e79b4e 100644 --- a/implementation/codfns.md +++ b/implementation/codfns.md @@ -48,7 +48,7 @@ The sort of static guarantee I want is not really a type system but an *axis* sy In his Co-dfns paper Aaron compares to nanopass implementations of his compiler passes. Running on the CPU and using Chez Scheme (not Racket, which is also presented) for nanopass, he finds Co-dfns is up to **10 times faster** for large programs. The GPU is of course slower for small programs and faster for larger ones, breaking even above 100,000 AST nodes—quite a large program. I think comparing the self-hosted BQN compiler to the one in dzaima/BQN shows that this large improvement is caused as much by nanopass being slow as Co-dfns being fast. -The self-hosted compiler running in CBQN reachej full performance at about 1KB of dense source code. On large files it achieves speeds around 3MB/s, about **two-thirds as fast** as dzaima/BQN's compiler. This compiler was written in Java by dzaima in a much shorter time than the self-hosted compiler, and is equivalent for benchmarking purposes. While there are minor differences in syntax accepted and the exact bytecode output, I'm sure that either compiler could be modified to match the other with negligible changes in compilation time. The Java compiler is written with performance in mind, but dzaima has expended only a moderate amount of effort to optimize it. +The self-hosted compiler running in CBQN reaches full performance at about 1KB of dense source code. On large files it achieves speeds around 3MB/s, about **two-thirds as fast** as dzaima/BQN's compiler. This compiler was written in Java by dzaima in a much shorter time than the self-hosted compiler, and is equivalent for benchmarking purposes. While there are minor differences in syntax accepted and the exact bytecode output, I'm sure that either compiler could be modified to match the other with negligible changes in compilation time. The Java compiler is written with performance in mind, but dzaima has expended only a moderate amount of effort to optimize it. A few factors other than the speed of the nanopass compiler might partly cause the discrepancy, or otherwise be worth taking into account. I doubt that these can add up to a factor of 15, so I think that nanopass is simply not as fast as more typical imperative compiler methods. |
