Bug 15865

Summary: Store .lut.h hashfile keys as UTF16 stings for faster key compares
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: emacemac7
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
the fix
none
naive fix (0.5% slower according to SunSpider) none

Description Eric Seidel (no email) 2007-11-06 20:01:03 PST
Store .lut.h hashfile keys as UTF16 stings for faster key compares

I've attached a patch which does that, I've not yet perf tested it.  (About to do so.)
Comment 1 Eric Seidel (no email) 2007-11-06 20:01:48 PST
Created attachment 17077 [details]
the fix
Comment 2 Eric Seidel (no email) 2007-11-06 20:40:06 PST
Created attachment 17079 [details]
naive fix (0.5% slower according to SunSpider)
Comment 3 Eric Seidel (no email) 2007-11-06 21:02:37 PST
Hum.. well, the shark diff makes no sense at all.

    spectral-norm:     2.2% *slower*    126.8ms +/- 0.8%    129.6ms +/- 0.9%     significant

is the worst regression.  four others are more than 1.0% slower.  Overall 0.2% slower according to my most recent run.
Comment 4 Eric Seidel (no email) 2007-11-08 13:16:38 PST
A good test to try and optimize this with might be string-validate-input.js.  I see that test spending 2.4% of total time in findEntry()
Comment 5 Darin Adler 2008-04-02 02:29:48 PDT
I did a fancier version of this optimization recently. I think this bug is probably obsolete.
Comment 6 Alexey Proskuryakov 2009-03-24 10:57:45 PDT
Eric, is this bug still valid?
Comment 7 Eric Seidel (no email) 2009-03-24 11:29:24 PDT
Yeah, I think we tried this and it was slower.