use .pop() on an array instead of setting the length directly.  The latt...

...er causes v8 to stop optimizing the method.