Pyrex

I slipped into the end of the afternoon tutorial session Optimizing pthon, and I caught a tidbit about pyrex. Wow – that’s cool! I’d already been somewhat aware of pysco, which does runtime machine code compilation (x86 only). Pyrex takes sort of an interesting view – if you declare that the variables are typed, then it can generate C modules for optimal use of the code. It means you have to (create and) run a setup.py installer, but man – the speed increase that provides is amazing.

And fundamentally, I love the idea that you can specify types if it buys you something, but default allows it all to be dynamic. Java seems to be all the reverse: you’ve GOT to specify a type, and then you can do the generics to try and make it a little more free-ranging on the types.