JuliaLang/julia — pull request #318 by vtjnash (2011-12-18 05:24:43+00:00)
Title: additions to intset

I've added a few math functions to intset (and, or, not, xor) that should be generally useful, as well as a few other functions.

In addition, I've cloned the c code that implements intset's into julia to benchmark the difference. It should work for all cases, as long as the type conversions were transfered correctly. On my computer, the c implementation runs a certain benchmark involving lots of iterations over the array (and a simple add) in about 7 seconds, the julia replacement implementation takes about 10s. I've copied just the functions requiring replacement, so you can load them after starting julia and they will replace the current c functions. It will also compile as a replacement for the system intset.
Jeff, I've tagged a few things with types (the variable w and the function cttz_int) to get type inference to compile this correctly (as of a week ago). Do you know why these were necessary?