最適化するとここまで早くなるのかと感心した@HIROCASTERでございませう。 Google I/O 2012 のなかで発表されたV8エンジン向けのJavaScript最適化の話です。 15.5秒ほどかかっていた処理が0.04秒まで高速化しています。 Initialize all object members in constructor functions Always initialize object members in the same order Prefer numeric values that can be represented as 31-bit signed integers Use contiguous keys starting at 0 for Arrays Don’t pre-allocate large Arrays (>64K elements) to
![JavaScriptパフォーマンスを上げるシンプルな13の最適化 | Act as Professional](https://cdn-ak-scissors.b.st-hatena.com/image/square/d19d03e02e7dfacbd63b1906a905fa394a6ce02e/height=288;version=1;width=512/https%3A%2F%2Fhiroki.jp%2Fwp-content%2Fuploads%2F2012%2F07%2F51yrjFsf-2L._SL160_.jpg)