Ionrock Dot Org

by Eric Larson

My Weblog

Ruby Priority Queue

Once again Uche brought an interesting bit of computer science to my attention in BC. He started using the Python heapq module to help speed up an index in BC. I had never used the module before and wasn't exactly clear at first glance how it worked. I took some time last night to implement something similar in Ruby to help get a better understanding. I ran some exceptionally unscientific tests to see if it was incredibly slow and as far as I could tell, it seemed quick enough to use. If anyone is interested in grabbing a copy you can download here . I don't plan on making any updates or maintaining something serious here, but if others have suggestions or notice any errors please send them along.

Posted Tue Apr 15 20:16:36 2008 by Eric Larson
using python, jquery and emacs ;)