Archive for April, 2009

Interval trees: even faster in cython

April 1, 2009

Cython is a clever Python extension that allows you to write Python modules using C data types. This improves performance – quite a lot, as it happens. The guy whose interval trees I was using recommended a cython implementation that reduced my bin filing time from 90 minutes to about 7. Yikes.

This actually reminds me of my previous career in formal methods and specifically model checking. When faced with a large computational problem, it’s very tempting to give up and look to faster hardware to give you execution that is twice or three times as fast. However, with a bit of thought and by knowing your tools (or in this case, knowing who to ask) you can get a much greater improvement without spending a penny…

Advertisements