RESOLVED FIXED Bug 26957
RegExp::match to be optimized
https://bugs.webkit.org/show_bug.cgi?id=26957
Summary RegExp::match to be optimized
Yong Li
Reported 2009-07-03 13:35:00 PDT
Created attachment 32246 [details] the patch RegExp::match() should use inline Vector rather than OwnArrayPtr for better performance. The patch is attached. It gives more than 20% boost to sunspider string-unpack-code test, and gives about 8% boost to sunspider overall result.
Attachments
the patch (10.01 KB, patch)
2009-07-03 13:35 PDT, Yong Li
mjs: review+
George Staikos
Comment 1 2009-07-03 13:40:02 PDT
Note: the performance test was done on ARM with bytecode (no JIT), no FPU.
Gavin Sherlock
Comment 2 2009-07-03 14:32:52 PDT
Possibly a dupe of Bug 26316
Maciej Stachowiak
Comment 3 2009-07-03 18:17:45 PDT
Comment on attachment 32246 [details] the patch Thanks for the patch! Looks like a good fix. On Mac OS X, this gives a 5% speedup on string-unpack code and smaller speedups on the other string tests, for an overall benefit of around 0.3% to SunSpider overall (some tests seem to slow down a bit but this appears to be noise). This patch doesn't handle the YARR case, I went ahead and filled that in and will post the revised patch in addition to commiting it. Also this patch was missing a ChangeLog.
Yong Li
Comment 4 2009-07-03 19:15:21 PDT
Thanks, Maciej. Should I create a changelog by myself? The reason why we get more speedup is probably that our memory allocation is much slower than Mac OS.
Maciej Stachowiak
Comment 5 2009-07-04 07:23:21 PDT
For future patches, please include a ChangeLog entry (the prepare-ChangeLog script can fill in a lot of it for you). For this patch, I wrote a ChangeLog entry for you and checked it in (along with a few code changes to work with YARR) as <http://trac.webkit.org/changeset/45545>. If the allocator on your platform is that slow, you may want to look into whether it's possible to use FastMalloc.
Yong Li
Comment 6 2009-07-04 09:00:28 PDT
(In reply to comment #5) > For future patches, please include a ChangeLog entry (the prepare-ChangeLog > script can fill in a lot of it for you). For this patch, I wrote a ChangeLog > entry for you and checked it in (along with a few code changes to work with > YARR) as <http://trac.webkit.org/changeset/45545>. > If the allocator on your platform is that slow, you may want to look into > whether it's possible to use FastMalloc. Thanks a lot. prepare-ChangeLog never works for me (in GIT BASH). I have to do it manually.
Gavin Barraclough
Comment 7 2011-06-10 13:01:27 PDT
*** Bug 26368 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.