Closed
Bug 420368
Opened 16 years ago
Closed 14 years ago
Array.push needs optimization for the single-arg case.
Categories
(Tamarin Graveyard :: Virtual Machine, enhancement, P4)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
VERIFIED
WONTFIX
Q3 11 - Serrano
People
(Reporter: stejohns, Unassigned)
References
Details
(Keywords: perf, Whiteboard: PACMAN)
Array.push() is almost always called with just one arg. I dont know if there's a good way to optimize for that case if the args have already been turned into an array of rest args, but something to bug-ize, for future enhancement, maybe. when the tracer is allowed to follow at least one backedge, then this push loop will iterate one time, so we'll inline exactly 1 iteration of the loop if there is 1 arg to push(). the value will still have been laundered through the args array, but we can think about array load/store optimizations in the future. (ie if you start with an arg, put it in an array, get it back out, and the array dies on the same trace, we shouldn't even need to allocate the array.
Reporter | ||
Comment 1•16 years ago
|
||
thinking out loud... perhaps the right approach here would be (1) allow native methods to take argc/argv style arguments with having to encode them into an array (2) implement push() as a native method (1) has been requested by people who anticiate array-ification of varargs to be too slow, anyway...
Comment 2•16 years ago
|
||
variation 1 - use forth instead of C issue - what about Array.prototype.push(), its always bothered me that anonymous closures can't be native. wondering if there's a way to pull this off, or to have a method closure become a true function (no bound 'this') somehow, then have Array.prototype.push = magic_unbind_this(_push); .. or something
Reporter | ||
Comment 3•16 years ago
|
||
can't anonymous closures be native? seems like we just have to make a native static function of the right signature and use it.
Comment 4•16 years ago
|
||
static methods aren't function closures -- you can extract them but they are MethodClosures with "this" bound to the class object. what would the name of the native method be if it's anonymous?
Reporter | ||
Comment 5•16 years ago
|
||
doh. sorry. late friday afternoon. :-)
Updated•15 years ago
|
Flags: in-testsuite?
Flags: flashplayer-triage+
Flags: flashplayer-qrb?
Flags: flashplayer-qrb? → flashplayer-qrb+
Priority: -- → P4
Target Milestone: --- → Future
Updated•15 years ago
|
Target Milestone: Future → flash10.1
Updated•14 years ago
|
Whiteboard: PACMAN
Comment 6•14 years ago
|
||
rest arg optimizations underway, anything left to do here after that lands?
Depends on: 569321
Comment 7•14 years ago
|
||
Rendered moot by rest arg optimization, which just landed.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•