Here at Untyped Central Dave and I are hacking away like lumberjacks, which is a good thing as the project we’re working on is due soon. We’re constantly running tests and loading code into the web server, and we’ve noticed that these processes have been getting slower and slower. It turns out the bottleneck is the time to parse and byte compile our Scheme code. Simply byte compiling the code beforehand has made an incredible difference. Tests that used to take minutes now run in seconds. Two features of PLT Scheme make it really easy to integrate byte compilation into our development process. Firstly,
mzc will follow dependencies when given the
-k flag. So we just run
mzc -k main.ss and all our code is compiled. Also useful is that PLT Scheme does the Right Thing and loads source code if it’s newer than byte compiled code, so we don’t have to constantly recompile our code. So we can just code away as normal, except every time we take a break we run
mzc. Eventually we might write some code to recompile at regular intervals (say, every 10 minutes) but for now it isn’t worth the effort.