Closed
Bug 495848
Opened 16 years ago
Closed 7 years ago
ABC Interpreter should use computed-gotos when possible
Categories
(Tamarin Graveyard :: Interpreter, defect)
Tamarin Graveyard
Interpreter
Tracking
(Not tracked)
RESOLVED
WONTFIX
Future
People
(Reporter: stejohns, Unassigned)
Details
Currently, the ABC-only interpreter always dispatches via a switch statement. Using computed-goto on compilers that support it is a measurable speed gain (up to 15% in TT IIRC) and should be simple to implement.
Comment 1•16 years ago
|
||
the abc interpreter can't (by definition) use direct-threaded code. It could however use indirect threaded code plus computed gotos.
Comment 2•16 years ago
|
||
(In reply to comment #1)
> the abc interpreter can't (by definition) use direct-threaded code. It could
> however use indirect threaded code plus computed gotos.
Steven swears it helps. Probably compiler and CPU dependent (you get rid of at most a range check in the switch, plus a jump to the switch dispatch, plus you get marginally better branch prediction at the end of each instruction).
Updated•16 years ago
|
Target Milestone: --- → Future
Updated•15 years ago
|
Component: Virtual Machine → Interpreter
Updated•15 years ago
|
Flags: flashplayer-qrb+
Comment 3•15 years ago
|
||
agreed, seems like low hanging fruit on GCC or ARMCC even without direct threading.
Comment 4•15 years ago
|
||
I'm skeptical about the 15% given the current interpreter structure with our very-fat bytecodes (compare to TT's very skinny ones), and given the amount of branching and the presumably relatively simplistic branch prediction hardware on mobile CPUs I'm skeptical about those gains too. It may be low hanging fruit, but is it edible? :-)
Comment 5•15 years ago
|
||
I would be extatic if we got 15%, we probably won't. i think we should keep this open as an option but not work on it until there's evidence it will matter.
Reporter | ||
Comment 6•15 years ago
|
||
(In reply to comment #5)
> I would be extatic if we got 15%, we probably won't.
No, but I wouldn't be surprised if it was 2-3%, and it's a small amount of work...
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•