andreasgal/j2me.js — pull request #401 by mcav (2014-10-06 20:17:34+00:00)
Title: Optimize Frame constructor.

A profile shows the `Frame` constructor taking 550ms. This patch optimizes the Frame constructor by doing two things, bringing the total time down to around 230ms:

- Extracting the inline definition of `stack.read` to an Array prototype method (since we already override several properties on Array, it seems reasonable to add one more)
- Caching `isSynchronized`, which itself took 150ms.