At any rate, the optimized code compiles and runs fine, as does the unoptimized one.
One thing I didn't get a chance to talk about is the room function, which tells you about the memory your program is consuming. I used that to set the memory size ahead of time in the create-index function. I also shut off GC until the table is built, since I know ahead of time how big it is going to be.