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.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s