Closed Bug 543119 Opened 14 years ago Closed 14 years ago

typed array tracing should be more const than it is

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: vlad, Unassigned)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(2 files)

Many of the components involved in typed arrays (classword, length, data pointer) are actually constant per object and so should be loaded using ldc variants so that CSE can take full effect.

Doing this is a massive perf speedup -- my matrix mult benchmark goes from 250ms -> 140ms.  (Native SSE2-optimized C++ code is around 30ms.)
Attachment #424328 - Flags: review?(gal)
Attachment #424328 - Flags: review?(gal) → review+
Comment on attachment 424328 [details] [diff] [review]
use const loads where appropriate

Comment with link to better cse bug and explanation would be nice.
http://hg.mozilla.org/tracemonkey/rev/a8dc506b2460
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Converted old STOBJ_GET_CLASS(obj) to obj->getClass() too.

/be
Attachment #424514 - Flags: review?(vladimir)
Do you want a typed-array JSOP_LENGTH special case in the interpreter (jsops.cpp)?

/be
Comment on attachment 424514 [details] [diff] [review]
cleanup, share source of TR::guardClass instead of copy/pasting it with ldcp tweak; else after return; RETURN_STOP_A; etc.

Probably should special-case it in the interpreter as well for consistency.. I can do the patch shortly.
Attachment #424514 - Flags: review?(vladimir) → review+
Followup:

http://hg.mozilla.org/tracemonkey/rev/a24c3eeac2f3

/be
Whiteboard: fixed-in-tracemonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: