From: Joel VanderWerf Date: 2002-04-11T04:13:58+09:00 Subject: Re: ruby speed? Matt Sergeant wrote: > > Thomas Hurst wrote in message news:<20020406105449.GA20294@voi.aagh.net>... > > Ruby's C API kicks crap out of Perl. > > Except when using Inline::C. > > Matt. Well, there is CGenerator on RAA :) I'm not sure how it compares to Perl's inline, but it definitely lets you write inline code. It is especially useful for metaprogramming (I use it to generate fast numerical functions from ruby inputs, and dynamically load them). It also includes CShadow, which is an easy way of writing classes with C structs attached to them. You declare your attributes, and the mark, free, accessor, initialization, and serialization(*) code is written for you. Adding new methods written in C is fairly easy, though you are responsible for data type conversion. See the examples subdir. -- (*) serialization requires that you apply a patch to marshal.c, which Matz said he would incorporate into some future release.