22 Apr
2010
22 Apr
'10
10:01
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: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org