Closed
Bug 617136
Opened 14 years ago
Closed 13 years ago
Investigate RegExp slowness on Peacekeeper snippet
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: cdleary, Assigned: cdleary)
References
(Blocks 1 open bug)
Details
Jandem pointed out this example, derived from Dromaeo. function f(ua) { var x = 0; var t0 = new Date; for(var i=0; i<10000000; i++) { //var ua1 = ua + i; if (/Windows/.exec(ua)) x++; } alert(new Date - t0); return x; } f("Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"); <jandem> bz: when i change exec to test... FF4: 3600 ms, latest webkit nightly: 2200 ms, opera 980 ms...
Assignee | ||
Updated•14 years ago
|
Summary: Investigate RegExp slowness → Investigate RegExp slowness on Dromaeo snippet
Updated•14 years ago
|
Assignee: general → cdleary
QA Contact: cdleary → general
Comment 1•14 years ago
|
||
Not Dromaeo but Peacekeeper. stringDetectBrowser test (see http://hg.mozilla.org/users/mpalmgren_mozilla.com/peacekeeper) But I think it's a general regexp problem, so it affects Dromaeo too.
Blocks: peacekeeper
Summary: Investigate RegExp slowness on Dromaeo snippet → Investigate RegExp slowness on Peacekeeper snippet
Comment 2•13 years ago
|
||
Isn't this one fixed now?
Comment 3•13 years ago
|
||
Seems to be in the sense that exec() and test() do equally fast (or slowly?) on the testcase from comment 0 in latest nightly. We're faster than Chrome there, but slower than Opera....
Assignee | ||
Comment 4•13 years ago
|
||
That sounds fixed to me (by Brian's bug to elide object creation in the regexp literal exec case). Reopen if there are objections.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•