From: Christian Szegedy Date: 2002-09-20T02:01:04+09:00 Subject: Re: subclassing Integer William Djaja Tjokroaminata wrote: > Hi, > > Using C, if a state can be represented as a number between 0 and 255, we > can use an array of (unsigned) char's. With this, 100 millions of states > = 100 Mbytes of memory. With Ruby array of integers, this is equal to 400 > Mbytes of memory. Because these days a workstation typically has 0.5 to 2 > gigabytes of memory, using either Ruby or C can be a "make or > break" case, depending on exact number of the 100 millions. Also, > depending on the algorithm, the C execution may be 10 times faster. > > You can use Strings in Ruby to achieve the same memory performance. Of course, you are right about the execution performance, but the development time is also an important factor. Best Regards, Christian