Closed Bug 860794 Opened 12 years ago Closed 12 years ago

OdinMonkey: investigate slowdown on matrix multiplication

Categories

(Core :: JavaScript Engine, defect)

x86_64
All
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: luke, Unassigned)

References

Details

Attachments

(2 files)

For the attached code, the handwritten (non-asm.js) code is slightly faster than the asm.js on OdinMonkey. It's a tiny kernel doing double math and float32 loads/stores so I'd expect a slight speedup.
Attached file handwritten
Attached file equivalent asm.js
Actually, on my faster desktop, they are about the same. My MBP showed the slowdown. Perhaps misaligned loads?
(In reply to Luke Wagner [:luke] from comment #3) > Actually, on my faster desktop, they are about the same. My MBP showed the > slowdown. Perhaps misaligned loads? Isn't the hand written one only doing integer arithmetic, because there is only identity matrix flowing in, and operations such as multiplications and additions are monitored as being numbers?
Great question; I tried that last night and I didn't see a change. For one thing, the multiplied values are flowing out of and into a Float32Array.
I checked again and asm.js does seem slightly faster, both in the browser and in the shell. valgrind shows less instructions and less data references.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: