Bug 42002

Summary: Avoid extra memcpy of character tokens
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Adam Barth <abarth>
Status: RESOLVED FIXED    
Severity: Normal CC: eric
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 41123    
Attachments:
Description Flags
Patch
none
Patch
none
Patch eric: review+, eric: commit-queue+

Description Adam Barth 2010-07-09 16:30:22 PDT
Avoid extra memcpy of character tokens
Comment 1 Adam Barth 2010-07-09 16:37:26 PDT
Created attachment 61112 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-07-09 18:13:42 PDT
Comment on attachment 61112 [details]
Patch

Would be nice to see perf numbers.

Would like to see this change split into two.  One which is just refactoring.  One which actually changes the memory management. :(
Comment 3 Adam Barth 2010-07-14 16:38:53 PDT
Created attachment 61582 [details]
Patch
Comment 4 Eric Seidel (no email) 2010-07-14 16:41:45 PDT
Comment on attachment 61582 [details]
Patch

I like no functional change patches. :)
Comment 5 Adam Barth 2010-07-14 16:44:15 PDT
Committed r63372: <http://trac.webkit.org/changeset/63372>
Comment 6 Eric Seidel (no email) 2010-07-14 16:45:34 PDT
With the old patch applied:
Running 20 times
Ignoring warm-up run (3283)
2896
2900
2897
2917
2909
2911
2945
2940
2920
2912
2913
2916
2965
2935
2924
2950
2959
3007
3017
3005

avg 2936.9
stdev 36.088640872163644

That's (maybe) 1% faster than the old parser:

avg 2970.4
stdev 15.954309762568855

Running 20 times
Ignoring warm-up run (3351)
2933
2949
2960
2974
2990
2984
2995
2991
2979
3008
2987
2989
2997
2998
3003
3005
2991
3016
3016
3020
Comment 7 Eric Seidel (no email) 2010-07-14 16:46:26 PDT
*** Bug 42302 has been marked as a duplicate of this bug. ***
Comment 8 Adam Barth 2010-07-14 17:51:03 PDT
Created attachment 61590 [details]
Patch
Comment 9 Adam Barth 2010-07-14 18:14:06 PDT
Committed r63387: <http://trac.webkit.org/changeset/63387>