Closed Bug 1062782 Opened 10 years ago Closed 10 years ago

Switch Matrix implementations to use Float64Array (or Float32Array, if that works)

Categories

(Firefox Graveyard :: Shumway, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: till, Assigned: mbx)

References

Details

(Keywords: perf)

See the results in http://jsperf.com/dommatrix-perf/7 for reasons. Also, this should pack things more tightly, at the very least with bhackett's work on optimizing typed array memory usage in bug 1058340.
Blocks: shumway-m3
Keywords: perf
Assignee: nobody → mbebenita
The JS perf results don't have a test case that match our implementation. I'll experiment, but I can't imagine why Float arrays would necessarily be faster.
As it turns out, normal JS Arrays seem fastest by quite a margin once the test is fixed to only create the temporary arrays once and reuse them: http://jsperf.com/dommatrix-perf/9 I also added a simple JSMatrix, which is about as fast as the float array version, but a lot slower than the JS Array version.
Looks like Float64Arrays are actually faster than Float32Arrays. Here is a PR that changes both the GFX and Flash Matrix class. https://github.com/mozilla/shumway/pull/1706 Till, what do you think about creating matrix pools so we can reuse them.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.