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

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

主站蜘蛛池模板: 罗平县| 长子县| 武强县| 临澧县| 阳东县| 思南县| 合山市| 文安县| 唐河县| 和顺县| 名山县| 信丰县| 甘洛县| 汤阴县| 绵阳市| 鄂托克旗| 益阳市| 金堂县| 稻城县| 深圳市| 彰化市| 蕉岭县| 尉犁县| 张掖市| 西华县| 民和| 河东区| 镇平县| 历史| 曲沃县| 裕民县| 镇康县| 阳泉市| 长岭县| 太仆寺旗| 社旗县| 通山县| 定远县| 温泉县| 高邮市| 阜城县|