On Tue, 13 Jan 2004, Dave Thomas wrote: > > On Jan 12, 2004, at 15:43, Charles Mills wrote: > > > What abouts Rubys design would make integer arithmetic slower than > > integer > > arithmetic in Perl? > > class Fixnum > def +(other) > self.to_s + other.to_s > end > end > > puts 1 + 2 #=> "12" > > > Ruby has to do full OO method dispatch for basic arithmetic operators. > I guess I was expecting the addition of Fixnums to be implemented in C (unless of course you override it). > > Cheers > > Dave > > >