From: Pito Salas Date: 2009-07-14T10:23:26+09:00 Subject: Re: Performance question Ben Giddings wrote: > Rather than worry too much about whether to use structures, objects or > hashes for speed, why not choose the data type that makes the rest of the > program easiest to write and to read. If later you decide it needs to be > faster or smaller, you can adjust it, but unless you're running on an > embedded system, it's unlikely you'll have to. The example I gave was purposely oversimplified to make it easy to explain and understand. In reality the records will be far more complex and the numbers perhaps in the hundreds of thousands. But still I do agree with you. I was just trying to see if one of the three choices was clearly brain dead or clearly the best one. Would using a hash repeat over and over the text of the keys (I assume 'no') or have far slower access? Would using a class that never would have a method incur a major performance overhead because accessing each value required a method call anyway? - Pito -- Posted via http://www.ruby-forum.com/.