From: Phil Jackson Date: 2006-06-03T10:35:02+09:00 Subject: Re: Speed of Ruby program != Speed of Ruby language (was Re: Zed and Luis drop the bomb on Ruby's poor performance) On Fri, Jun 02, 2006 at 07:56:10 +0900, Dave Howell wrote: >>>That might make my *program* run faster, but it didn't do >>>diddly-squat for making *Ruby* faster. >> >>Do you use the YAML parser in Ruby? > > No. > >>Or the String class? > > Yes. > >> They're C. > > I find that assertion to be quite ludicrous. A C string is a > null-terminated byte sequence. ..snip.. > The String class is not only nothing like a C string, it's not a string at > all, in the sense that any/all other languages I've met use the term. This is the point you should just let this one go I think. Ruby is written in C and the String object wraps one of these (as defined in ruby.h): struct RString { struct RBasic basic; long len; char *ptr; union { long capa; VALUE shared; } aux; }; What this boils down to is that a Ruby String *is* a C string with fancy clothes on. Cheers, Phil