From: Robert Klemme Date: 2006-06-05T01:55:20+09:00 Subject: Re: Ruby's Bignum 2006/6/4, Lloyd Zusman : > > And if you need this in multiple places of the program then it's > > probably worth while to create a new subclass of Integer that > > restricts itself to 32 bit calculations > > It's a nice excercise to get used to operators and numercial coercion. :-) > > > > Maybe we can even generalize that and put it into the standard lib - > > something like a restricted integer that calculates with a max number > > of bits. > > This is indeed a good Ruby exercise, but if it ever ends up in the > standard library, I would then vote for it to be re-implemented in C, as > the Ruby version would be hugely less efficient than the native > 32-bit-integer operations that are already available in C. Completely agree! robert -- Have a look: http://www.flickr.com/photos/fussel-foto/