Closed
Bug 564167
Opened 16 years ago
Closed 16 years ago
Minimize string allocations during interning of integers
Categories
(Tamarin Graveyard :: Virtual Machine, defect, P5)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
RESOLVED
FIXED
Q3 11 - Serrano
People
(Reporter: pnkfelix, Assigned: pnkfelix)
References
Details
(Whiteboard: PACMAN)
Attachments
(2 files)
|
1.50 KB,
patch
|
stejohns
:
review+
|
Details | Diff | Splinter Review |
|
10.47 KB,
patch
|
stejohns
:
feedback+
|
Details | Diff | Splinter Review |
Avoid allocating a Stringp on the GC heap until after we have
confirmed that there is not already an entry in the intern table
corresponding to the int.
(I've already done the leg work for this while working on bug 555982; I just decided that it needs its own ticket after looking over bug 505194.)
| Assignee | ||
Updated•16 years ago
|
Whiteboard: PACMAN
| Assignee | ||
Comment 1•16 years ago
|
||
(rebased patch from bug 555982.)
bugzilla 564167: Avoid Stringp allocation during int intern.
Avoid allocating a Stringp on the GC heap until after we have
confirmed that there is not already an entry in the intern table
corresponding to the int.
(More detailed discussion on bugzilla 564167 and bugzilla 555982.)
Attachment #452343 -
Flags: review?(stejohns)
Comment 2•16 years ago
|
||
Comment on attachment 452343 [details] [diff] [review]
Avoid Stringp allocation during int intern
Looks fine -- any benchmarks (micro or otherwise) showing this moving the needle?
Attachment #452343 -
Flags: review?(stejohns) → review+
| Assignee | ||
Comment 3•16 years ago
|
||
(In reply to comment #2)
> (From update of attachment 452343 [details] [diff] [review])
> Looks fine -- any benchmarks (micro or otherwise) showing this moving the
> needle?
It would not hard for me to construct some, since the patches for bug 555982 only helped unsigned integers, so negative indices are still going this path.
I'll either find an earlier micro benchmark or make up a new one quickly and post the results.
Comment 4•16 years ago
|
||
(In reply to comment #3)
> I'll either find an earlier micro benchmark or make up a new one quickly and
> post the results.
IMHO such results aren't strictly necessary for this to land -- I'm willing to believe that reducing temporary GC allocations is always a good thing -- but would be useful evidence to have, just in case.
Comment 5•16 years ago
|
||
perf benchmarks aren't the only kind of data, by the way. measuring the total # of gc allocations in some test, and showing the delta, is good argumentation as well. (not that i'm not already in support of the change, just sayin).
| Assignee | ||
Comment 6•16 years ago
|
||
bug 564167: asmicro benchmarks showing performance delta.
(patch generated via "hg log -r 4966 -v --patch")
The micro-benchmarks are banging on lookups of negative index-properties. I varied the dimensions of the benchmarks according to receiver type (array or object) and whether the property is present or absent, for a total of four micro-benchmarks.
Executive summary: for this ridiculous micro-benchmark, performance generally improved by 60-70%. It is interesting to note that lookup-negindex-array-2 is an outlier compared to the other 3 microbenchmarks; this was the case both before and after the patch. Presumably it is because the code paths in array are optimized for the case where a lookup succeeds, which seems sensible. (But on the other hand, one would think that an array receiver would not perform worse than an object receiver in general...)
Below are the results direct from runtests.py:
bash-3.2$ python runtests.py --iterations 3 -f --avm ../../objdir-baseline32/shell/avmshell --avm2 ../../objdir-32/shell/avmshell asmicro/lookup-negindex*.as
Tamarin tests started: 2010-06-23 17:40:33.673315
Executing 4 test(s)
avm: ../../objdir-baseline32/shell/avmshell version: cyclone
avm2: ../../objdir-32/shell/avmshell version: cyclone
iterations: 3
Note that %diff is calculated using the fastest value (not avg) of all runs
avm avm2
test min : max avg stdev min : max avg stdev %diff sig metric
--------------------------------- --------------------------------- ----- -------- ------
asmicro/lookup-negindex-array-1.as [ 246.0 : 247.0] 246.7 ± 0.2% [ 412.0 : 414.0] 413.0 ± 0.2% 67.6% 173.9 ++ v8 largerValuesFaster
asmicro/lookup-negindex-array-2.as [ 217.0 : 226.0] 222.7 ± 1.8% [ 360.0 : 365.0] 362.3 ± 0.6% 61.5% 25.9 ++ v8 largerValuesFaster
asmicro/lookup-negindex-object-1.as [ 252.0 : 253.0] 252.3 ± 0.2% [ 405.0 : 433.0] 423.3 ± 3.1% 71.1% 21.9 ++ v8 largerValuesFaster
asmicro/lookup-negindex-object-2.as [ 242.0 : 242.0] 242.0 ± 0.0% [ 414.0 : 416.0] 415.0 ± 0.2% 71.9% 365.4 ++ v8 largerValuesFaster
Attachment #453516 -
Flags: feedback?(stejohns)
| Assignee | ||
Comment 7•16 years ago
|
||
Comment on attachment 452343 [details] [diff] [review]
Avoid Stringp allocation during int intern
push me please.
Updated•16 years ago
|
Attachment #453516 -
Flags: feedback?(stejohns) → feedback+
Comment 8•16 years ago
|
||
pushed to TR as http://hg.mozilla.org/tamarin-redux/rev/580383e5a6f6
| Assignee | ||
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Flags: flashplayer-bug+
You need to log in
before you can comment on or make changes to this bug.
Description
•