Closed
Bug 589833
Opened 15 years ago
Closed 14 years ago
Vector slower than array in "some" test
Categories
(Tamarin Graveyard :: Virtual Machine, defect, P3)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
RESOLVED
WORKSFORME
Q4 11 - Anza
People
(Reporter: cpeyer, Assigned: lhansen)
References
Details
~5% slower in mixed/jit mode, ~3% slower in interp:
mixed:
some 77.1 72.8 -5.6%
interp:
some 176.4 171.7 -2.7%
jit:
some 76.4 73.1 -4.3%
Test is located in
asteam/hg/qe/projects/performance/tests/language/vector/some.abc
Flags: flashplayer-qrb?
Updated•14 years ago
|
Assignee: nobody → stejohns
Flags: flashplayer-qrb? → flashplayer-qrb+
Comment 1•14 years ago
|
||
Hmm, this is very peculiar; Vector uses the same implementation as Array, so the difference is presumably in helper functions or memory overhead
Lars, transferring from Steven to you for consideration in the Vector speedup work.
Assignee: stejohns → lhansen
Flags: flashplayer-bug-
Priority: -- → P3
Summary: Vector some slower than array some → Vector slower than array in "some" test
Target Milestone: --- → Q4 11 - Anza
Assignee | ||
Comment 3•14 years ago
|
||
The test case is arguably invalid as it stands. It compares the case of a Vector.<int> with an Array. The latter holds atoms, the former holds ints. The some() method takes a callback whose API accepts atoms. Thus there will be a song and dance on every invocation of the callback to convert a native int argument to the atom accepted by the method. This adds significant overhead.
With a current Release 32-bit Mac build on MacPro 2x2.93GHz Xeon, we have with the benchmark as written using Vector.<int>:
vector some : avg: 62.10 dev: 1.66 values: 64,62,63,60,60,65,61,63,62,61
array some : avg: 55.90 dev: 0.32 values: 56,56,55,56,56,56,56,56,56,56
and with the Vector case modified ot use Vector.<*> instead of Vector.<int>:
vector some : avg: 57.80 dev: 0.63 values: 58,57,59,58,57,58,58,57,58,58
array some : avg: 56.00 dev: 0.47 values: 56,55,56,57,56,56,56,56,56,56
There's some variability here, the array case is still faster on most runs so there's a small slowdown somewhere, but the difference is smaller than initially thought.
Assignee | ||
Comment 4•14 years ago
|
||
On a MacBook Pro, 2.6GHz Core 2 Duo (2008 model), the results are reversed with the modified benchmark, this run is typical:
vector some : avg: 82.60 dev: 0.97 values: 85,83,83,82,82,83,82,82,82,82
array some : avg: 86.10 dev: 0.88 values: 84,86,86,86,87,86,86,87,87,86
ie, the rest is noise.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•