Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!talisker.lacave.net!lacave.net!not-for-mail From: Martin Hansen Newsgroups: comp.lang.ruby Subject: Re: RubyInline trouble Date: Tue, 17 May 2011 04:16:13 -0500 Organization: Service de news de lacave.net Lines: 31 Message-ID: <937cc4915ef2f73508e7f4638447a02e@ruby-forum.com> References: NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1305623795 60899 65.111.164.187 (17 May 2011 09:16:35 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Tue, 17 May 2011 09:16:35 +0000 (UTC) In-Reply-To: X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 383377 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: <937cc4915ef2f73508e7f4638447a02e@ruby-forum.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:4663 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/.