Jarc> (compile "foo.arc")
Jarc> (iload "foo.class")
This had a 5x improvement on the startup time for Jarc. From 2.5 seconds to 0.4 seconds.
The run-time improvement is interesting. Initially the compiled code runs more slowly, but then improves after the first two runs. I ran the Jarc unit tests 10 times and recorded the time for each run.
This should shave a few seconds off the cold-startup time for Fandle on Google App Engine and allow slightly more processing per page hit or task. Page hits (and tasks) have a 30 second limit on App Engine so applications have to be designed to do their processing in 30 second increments.
Jaclyn optimizes tail recursive functions to avoid using unnecessary stack space. It's not generic tail call elimination, which is not possible in the JVM, but when a method calls itself, the compiler generates a jump to the top of the function instead of invoking the function. This makes recursion feasible for iteration and avoids StackOverflowError exceptions.
These optimizations are needed to optimize tail calls. If certain macros (like let) are not optimized then the recursive call winds up in a separate function and can't be optimized. But by optimizing:
Jaclyn can optimize many instances of tail recursion.
You can download Jarc 12 from SourceForge and you can also browse the source code.