官术网_书友最值得收藏!

Functions

Functions are typically called often, and should be one of your prime optimization focuses. Functions containing try-catch constructs are not optimizable, nor are functions containing other unpredictable constructs, like with or eval. If, for some reason, your function is not optimizable, keep its use to a minimum.

A very common optimization error involves the use of polymorphic functions. Functions that accept variable function arguments will be de-optimized. Avoid polymorphic functions.

An excellent explanation of how V8 performs speculative optimization can be found here: https://ponyfoo.com/articles/an-introduction-to-speculative-optimization-in-v8

主站蜘蛛池模板: 许昌县| 吐鲁番市| 台江县| 集安市| 庆元县| 永仁县| 大竹县| 同心县| 黄大仙区| 广昌县| 增城市| 贡觉县| 阳原县| 岢岚县| 南和县| 吴旗县| 廉江市| 建瓯市| 普安县| 正安县| 商河县| 鄂州市| 平舆县| 洪泽县| 太保市| 枣阳市| 华池县| 梓潼县| 潍坊市| 汉沽区| 三亚市| 峡江县| 玉田县| 多伦县| 资阳市| 民乐县| 黄浦区| 洛隆县| 麟游县| 甘泉县| 惠水县|