http://www.perlmonks.org?node_id=842357


in reply to Re: Shouldn't JSON be faster?
in thread Shouldn't JSON be faster?

That's interesting, I was able to show the same benefit. Why is OO interface slow?

SSF

Replies are listed 'Best First'.
Re^3: Shouldn't JSON be faster?
by Your Mother (Archbishop) on May 31, 2010 at 17:03 UTC

    OO uses methods instead of straight subs/functions and they (in the past at least) introduce an overhead of like 30%. OO is fantastic where appropriate but for stuff like this I think the functional interface is better.

Re^3: Shouldn't JSON be faster?
by Anonymous Monk on May 31, 2010 at 15:01 UTC
    What are you talking about? load_json is faster than load_config, and load_json is the only OO code shown