This seem to work:

http://pastie.org/1915197

I hope, I build the code the correct way?

Also, the speed increase is roughly 1-fold. I am a bit puzzled that Ruby
on its own is a tad slow on array accession and bit wise operations. But
when is a speed increase big enough to justify moving to Inline C?

Btw, is there a method to pretty print the resulting C code? That would
be nice for inspection.

Morever, I think RubyInline is a bit under documented. The Perl Inline
module comes with a very nice cookbook:

http://search.cpan.org/~sisyphus/Inline-0.48/C/C.pod
http://search.cpan.org/~sisyphus/Inline-0.48/C/C-Cookbook.pod


This RubyInline tool is really cool I must say!


Cheers,


Martin

-- 
Posted via http://www.ruby-forum.com/.