At 9:22 AM -0700 4/21/04, Jeff Clites wrote:
On Apr 21, 2004, at 4:05 AM, Leopold Toetsch wrote:

Jeff Clites <[EMAIL PROTECTED]> wrote:

Here's another tiny patch, to let us fast-fail string_equal if we have
cached hashval's which don't match.

Tested and applied now. I've also adoped JIT/i386 to use string_equal for C<eq> and C<ne> string ops. This speeds up these ops considerably *and* in the case what your test is showing, numbers indicate:

No stored hashval, 1000000 lookups each
same:  0.018617 sec
equal:  0.487958 sec
not equal:  0.517992 sec
With stored hashval, 1000000 lookups each
same:  0.019674 sec
equal:  0.487740 sec
not equal:  0.038465 sec

... a factor ~14 performance increase for the "not equal" case.

Ah, great! (And the "not equal" case is the only one which should be showing a speed up--the "same" and "equal" cases are expected to be unaffected.)

Just to make sure... we're making sure the strings are always properly decomposed before comparing, right?
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to