Closed
Bug 509826
Opened 14 years ago
Closed 14 years ago
replace js_NewStringCopyN uses with js_NewDependentString in jstr
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
People
(Reporter: luke, Assigned: luke)
References
Details
Attachments
(1 file, 1 obsolete file)
10.53 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
In find_replen and match_glob. This resulted in a 2-3% speedup in string-unpack-code. The patch also does a tiny bit o' cleanup.
Attachment #393890 -
Flags: review?(jwalden+bmo)
![]() |
Assignee | |
Updated•14 years ago
|
Summary: replace js_NewStringCopyN uses with js_NewDependentString → replace js_NewStringCopyN uses with js_NewDependentString in jstr
![]() |
Assignee | |
Comment 1•14 years ago
|
||
And for this micro-benchmark, 27% faster: var d = new Date(); var a; for (var i = 0; i < 200000; ++i) { a = "aabbccddaabbccddaabbccdd".replace(/(a+)(b+)(c+)(d+)/g, function(){return "."}); } print(new Date() - d);
![]() |
Assignee | |
Comment 2•14 years ago
|
||
Attachment #393890 -
Attachment is obsolete: true
Attachment #394175 -
Flags: review?(jwalden+bmo)
Attachment #393890 -
Flags: review?(jwalden+bmo)
Comment 3•14 years ago
|
||
review ping
Comment 4•14 years ago
|
||
Comment on attachment 394175 [details] [diff] [review] overly strong assertion, forgot about empty matches >diff --git a/js/src/jsstr.cpp b/js/src/jsstr.cpp >+ for (uintN j = 0; i < n; i++, j++) { >+ if (!PushRegExpSubstr(cx, cx->regExpStatics.parens[j], sp)) >+ goto lambda_out; >+ } >+ for (uintN j = 0; i < m; i++, j++) { >+ if (!PushRegExpSubstr(cx, cx->regExpStatics.moreParens[j], sp)) >+ goto lambda_out; >+ } I will assume we have dropped any compilers which hate "redeclaring" uintN j. Ware tinderbox bustage.
Attachment #394175 -
Flags: review?(jwalden+bmo) → review+
![]() |
Assignee | |
Comment 5•14 years ago
|
||
Thanks Waldo! http://hg.mozilla.org/tracemonkey/rev/c857e77e6f01
Comment 6•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/c857e77e6f01
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 7•14 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/937472db5fb9
status1.9.2:
--- → beta1-fixed
Flags: wanted1.9.2+
You need to log in
before you can comment on or make changes to this bug.
Description
•