Closed
Bug 910795
Opened 11 years ago
Closed 11 years ago
Investigate solutions to the slowdown caused by variadic string arguments
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: julienw, Assigned: bzbarsky)
Details
Attachments
(2 files)
5.70 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
4.08 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
From bug 814014 comment 41:
1) Using a variadic means we have to copy the string, since the type is
nsTArray<nsString>. This involves an allocation of the copied data and then
a deallocation. In this testcase those make up, between the two of them,
42% of the post-change time (so about 180ns: 3x what the entire call used to
take). For the specific case of variadic string arguments, we _could_ try
using an nsTArray<FakeDependentString> or some such. It would be annoying,
but... Alternately we could try something where we use nsTArray<nsString>
but rebind it as a dependent string.
Assignee | ||
Comment 1•11 years ago
|
||
I have some patches that avoid the string copy and speed up the toggle() and add() testcases by about 2x as a result...
Assignee: nobody → bzbarsky
Assignee | ||
Updated•11 years ago
|
Summary: Investigate solutions to the slowdown caused by variadic arguments → Investigate solutions to the slowdown caused by variadic string arguments
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #797436 -
Flags: review?(benjamin)
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #797437 -
Flags: review?(bugs)
Assignee | ||
Updated•11 years ago
|
Whiteboard: [need review]
Version: 22 Branch → Trunk
Comment 4•11 years ago
|
||
Comment on attachment 797437 [details] [diff] [review]
part 2. Use the new Rebind() setup to avoid creating string copies for variadic string arguments.
uh, aTokens. How did that pass my eyes. Could you rename to tokens
Attachment #797437 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 5•11 years ago
|
||
> Could you rename to tokens
Done.
Updated•11 years ago
|
Attachment #797436 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 6•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d42f8528d09f
https://hg.mozilla.org/integration/mozilla-inbound/rev/3e07ffec398e
Flags: in-testsuite?
Whiteboard: [need review]
Target Milestone: --- → mozilla26
Comment 7•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d42f8528d09f
https://hg.mozilla.org/mozilla-central/rev/3e07ffec398e
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•