Bug 79677 - Lexer: Specialize character predicates for LChar, UChar
Summary: Lexer: Specialize character predicates for LChar, UChar
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy Wingo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-27 09:22 PST by Andy Wingo
Modified: 2012-03-05 10:56 PST (History)
5 users (show)

See Also:


Attachments
Patch (20.70 KB, patch)
2012-02-27 09:41 PST, Andy Wingo
no flags Details | Formatted Diff | Diff
fix unused param warning on mac (20.68 KB, patch)
2012-03-05 03:32 PST, Andy Wingo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Wingo 2012-02-27 09:22:02 PST
The patch to be attached specializes some character predicates in the lexer for LChar vs UChar.
Comment 1 Andy Wingo 2012-02-27 09:41:37 PST
Created attachment 129055 [details]
Patch
Comment 2 Andy Wingo 2012-02-27 09:45:00 PST
Adding reviewers.  For speed tests, I used this:

$ time echo  'for (var i=0; i<1000; i++) checkSyntax("tests/parse-only/concat-jquery-mootools-prototype.js");' | /home/wingo/src/WebKit-trunk/WebKitBuild/Release/Programs/.libs/lt-jsc-3 /dev/stdin

real	0m6.290s
user	0m6.000s
sys	0m0.256s

$ time echo  'for (var i=0; i<1000; i++) checkSyntax("tests/parse-only/concat-jquery-mootools-prototype.js");' | /home/wingo/src/WebKit/WebKitBuild/Release/Programs/.libs/lt-jsc-3 /dev/stdin

real	0m6.141s
user	0m5.936s
sys	0m0.180s

That is to say, that I ran checkSyntax 1000 times in the same process on the larger file in the parse-only tests, and timed the whole run.  Here we see a reduction from 6.29 total seconds to 6.14 total seconds.  The times vary a bit, but they're about like this.
Comment 3 Andy Wingo 2012-03-05 03:32:48 PST
Created attachment 130089 [details]
fix unused param warning on mac
Comment 4 Oliver Hunt 2012-03-05 09:10:54 PST
Comment on attachment 130089 [details]
fix unused param warning on mac

r=me
Comment 5 Andy Wingo 2012-03-05 09:41:57 PST
Comment on attachment 130089 [details]
fix unused param warning on mac

Thanks!
Comment 6 WebKit Review Bot 2012-03-05 10:56:47 PST
Comment on attachment 130089 [details]
fix unused param warning on mac

Clearing flags on attachment: 130089

Committed r109769: <http://trac.webkit.org/changeset/109769>
Comment 7 WebKit Review Bot 2012-03-05 10:56:56 PST
All reviewed patches have been landed.  Closing bug.