Glenn M. Lewis wrote:
>     I have a Ruby script (a small part of it is included below)
> that has many methods, but one method is so incredibly slow that
> I would like to write it in C++ (or any other faster language).
[...]
>       mydate  = Date.new((year < 50 ? year+2000 : year+1900), month, day)

I predict that's your problem right there.  The parsing and 
initialization code of the Date class is incredibly slow.  I'd replace 
it with a less general-purpose implementation.


mathew
-- 
<URL:http://www.pobox.com/~meta/>
          WE HAVE TACOS