Leopold Toetsch <[EMAIL PROTECTED]> wrote:
OTOH I'm thinking of adding _keyed_str variants to used _keyed vtables. We are already constructing too much temporary key PMCs from a string just to pass a string to an hash lookup. Object ops and functions do this all over the place repeatedly.
And here is a profile timing comparison for doing 1E6 findclass ops [1]:
CODE OP FULL NAME CALLS TOTAL TIME AVG T. ms ---- ----------------- ------- ---------- ---------- 743 findclass_i_sc 1000000 1.356876 0.0014 -3 DOD 1058 0.211712 0.2001 ... ---- ----------------- ------- ---------- ---------- 11 3001066 1.666512 0.0006
Doing the same with a direct hash_get() [2]:
1257 findclass_str_i_sc 1000000 0.462577 0.0005 ... ---- ----------------- ------- ---------- ---------- 11 3000009 0.564461 0.0002
This is 3 times faster and saves ~1000 DOD runs.
Wow.
Okay. Go for it. -- Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk