Multiple assignment could be made faster by not returning unused array
----------------------------------------------------------------------
Key: JRUBY-2410
URL: http://jira.codehaus.org/browse/JRUBY-2410
Project: JRuby
Issue Type: Improvement
Components: Compiler, Interpreter
Reporter: Charles Oliver Nutter
Fix For: JRuby 1.1+
Currently, multiple assignment returns an array of the RHS:
{noformat}
~/NetBeansProjects/jruby ➔ ruby -e "p((a, b, c = 1, 2, 3))"
[1, 2, 3]
{noformat}
If this new array is not used, it is wasted. So a simple optimization for this
would be to only have the result of masgn produce an array iff there's a
consumer for that result.
We should make this optimization in both the interpreter and compiler. Might be
a good one for an interpreter or compiler newb to try out.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email