Arc Forumnew | comments | leaders | submitlogin
A very fast Scheme compiler (github.com)
3 points by malisper 3775 days ago | 3 comments


2 points by SteveGraham 3771 days ago | link

So, Stalin would produce faster executables than Gambit or Chicken? Otherwise, what would be the draw?

-----

1 point by akkartik 3771 days ago | link

I'm not sure anybody has characterized its performance to be faster or slower. But it's a small codebase and might be easier to understand than the alternative compilers.

Then again, at first glance I was unable to orient myself and figure out the global organization of the compiler. Is each scheme file a pass or a new version of the compiler with more optimizations?

-----

2 points by SteveGraham 3771 days ago | link

From Wikipedia:

Stalin (STAtic Language ImplementatioN) is an aggressive optimizing batch whole-program Scheme compiler written by Jeffrey Mark Siskind. It uses advanced flow analysis and type inference and a variety of other optimization techniques to produce code that is very fast, particularly for numerical code.[citation needed] In a number of tests it has outperformed hand-written C, sometimes by a considerable margin.[citation needed] Stalin is intended for production use in generating an optimized executable.

The compiler itself runs slowly, and there is little or no support for debugging or other niceties. Full R4RS Scheme is supported, with a few minor and rarely encountered omissions. Interfacing to external C libraries is straightforward. The compiler itself does lifetime analysis and hence does not generate as much garbage as might be expected, but global reclamation of storage is done using the Boehm garbage collector.

The name is a joke: "Stalin brutally optimizes."

-----