Bug 15865 - Store .lut.h hashfile keys as UTF16 stings for faster key compares
Summary: Store .lut.h hashfile keys as UTF16 stings for faster key compares
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-06 20:01 PST by Eric Seidel (no email)
Modified: 2009-03-24 11:29 PDT (History)
1 user (show)

See Also:


Attachments
the fix (4.50 KB, patch)
2007-11-06 20:01 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
naive fix (0.5% slower according to SunSpider) (5.67 KB, patch)
2007-11-06 20:40 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.