int3/doppio — pull request #72 by jvilk (2012-11-12 23:34:10+00:00)
Title: 20% performance improvement: Optimize RuntimeState.push

**This passes our testsuite, but there's always a possibility that I forgot to change something. Please review.**

RuntimeState now has three push methods: push, push2, and push_array. None of them are vararg functions.

Before, push would:
* Clone the input arguments passed to rs.push (CoffeeScript thing; probably because the ``arguments`` array [isn't actually an array](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Functions_and_function_scope/arguments#Description))
* Pass the cloned array through Array::push.apply

The result: a 20% combined overhead on compiling things with javac between the push method and the apply method.

Now, you can call push/push2 for the two common cases, and call push_array with an array of things to push onto the stack when you really need the convenience. And push_array no longer clones the input array.

Result: ~20% speed improvement on compiling "Hello World!" with javac (10s -> 8s), as the overhead for all three pushing methods is now <4%.

Hurray for low-hanging fruit!