http://qs321.pair.com?node_id=252978


in reply to Symbolic refs aka. dynamic variables again

Ok. I'm confused. I hope one of the more knowledgable internals monks is able to explain why storing a variable in the symbol table is so much more expensive than in a hash. My gut instinct is that it has something to do with the fact that storing something in the symbol table involves more overhead due to reserving a GLOB or something along those lines, but I just tested it on my box, and it's 3 times the memory for a symbolic ref than it is for a hash value. Is it something along those lines, is the fact that the container is the symbol table instead of an actual "container object" causing perl to do more work that a pedestrian monk such as myself wouldn't usually encounter? Am I at least on the right track?