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

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

主站蜘蛛池模板: 得荣县| 梁河县| 云龙县| 昔阳县| 禄劝| 新乐市| 松潘县| 张家港市| 峨山| 忻城县| 顺昌县| 台南县| 博罗县| 平邑县| 商南县| 安乡县| 钟祥市| 卓资县| 厦门市| 会同县| 盈江县| 鹤庆县| 商水县| 札达县| 精河县| 上高县| 高安市| 高青县| 潞城市| 哈巴河县| 泰顺县| 汤阴县| 乳山市| 东港市| 乌海市| 宁陕县| 莆田市| 高密市| 卫辉市| 湾仔区| 镶黄旗|