diff --git a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md index 1e08a77a..9daded53 100644 --- a/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md +++ b/docs/Writing-the-Cyclone-Scheme-Compiler-Revision-1.md @@ -36,6 +36,7 @@ Before we get started, I want to say **Thank You** to all of the contributors to - [Reader](#reader) - [Interpreter](#interpreter) - [Scheme Standards](#scheme-standards) +- [Benchmarks](#benchmarks) - [Future](#future) - [Conclusion](#conclusion) - [Terms](#terms) @@ -361,6 +362,28 @@ The interpreter's full implementation is available in the `(scheme eval)` librar Cyclone targets the [R7RS-small specification](https://github.com/justinethier/cyclone/raw/master/docs/r7rs.pdf). This spec is relatively new and provides incremental improvements from the popular [R5RS spec](http://www.schemers.org/Documents/Standards/R5RS/HTML/). Library support is the most important new feature but there are also exceptions, system interfaces, and a more consistent API. +## Benchmarks + +[ecraven](https://github.com/ecraven) has put together an excellent set of [Scheme benchmarks](http://ecraven.github.io/r7rs-benchmarks/benchmark.html). These are the typical Scheme benchmarks that many implementations use but the remarkable thing about this suite is all of the major implementations are supported. This allows an apples-to-apples comparison of all of the major implementations. + +Over the past year Cyclone has matured to the point where almost all of the 56 benchmarks will run: + + + +The remaining ones are: + +- `compiler` passes but returns the wrong result. This is going to be fun to track down since the program takes so long to compile... +- `mbrotZ` fails because Cyclone does not support complex numbers. +- `pi` does not work because Cyclone does not support bignums yet. + +Regarding performance, from Feeley's presentation: + +> Performance is not so bad with NO optimizations (about 6 times slower than Gambit-C with full optimization) + +But Cyclone has some optimizations now, doesn't it? The following is a chart of total runtime (in minutes) for the benchmarks that each Scheme passes successfully. Cyclone performs well against all of the interpreters but still has a long ways to go to match top-tier compilers. Then again, most of these compilers have been around for a decade or longer: + + + ## Future Some goals for the future are: @@ -376,18 +399,6 @@ In addition, developing [Husk Scheme](http://justinethier.github.io/husk-scheme) ## Conclusion -TODO: this section is completely out of date, a better reference would be benchmark results from r7rs-benchmarks - -From Feeley's presentation: - -> Performance is not so bad with NO optimizations (about 6 times slower than Gambit-C with full optimization) - -Compared to a similar compiler (CHICKEN), Cyclone's performance is worse but also "not so bad": - - - - - Thanks for reading! Want to give Cyclone a try? Install a copy using [cyclone-bootstrap](https://github.com/justinethier/cyclone-bootstrap).