in reply to Re^3: Optimizing a large project.
in thread Optimizing a large project.

The cost of tying is about 15% total

Where did you get this measure?

While developing Tie::Array::Packed I did some measurements and found my tied arrays (I know, we are talking about hashes here, but I don't thing there is going to be any significant difference) to be around 15 times slower (that is, 1400% performance penalty) than regular ones, and we are talking about a highly optimized XS implementation of the tie interface with almost no logic behind. The equivalent pure Perl implementation Tie::Array::PackedC was 60 times slower.

What this penalty represents inside the whole application is completely dependent on how often the tied objects are accessed. I don't thing you can claim it is 15% or anything else, it just depends!

Replies are listed 'Best First'.
Re^5: Optimizing a large project.
by dragonchild (Archbishop) on Jun 13, 2008 at 14:01 UTC
    That's funny. I was trying to find the reference and I can't. It's a number that's been in my head for years. Could be wrong. Huh.

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?