Hi,
when building hashes, watch for the type of hash keys.
Using strings (i.e. "key") affects performance since key operations involve
string
(character-by-character) compares.
Using symbols (i.e. :key) is faster and uses less resources. Symbols are
'interned', kept only once in memory, and compare operations are simple
integer compares.
Please keep this in mind when you see
{ "key" => ... }
and think about using
{ :key => ... }
instead.
Klaus
P.S.: Excessive hash usage should be replace by dedicated classes.
---
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]