- Mastering Node.js(Second Edition)
- Sandro Pasquali Kevin Faaborg
- 85字
- 2021-07-02 19:28:40
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
推薦閱讀
- 從區(qū)塊鏈到Web3:構建未來互聯(lián)網生態(tài)
- 5G承載網網絡規(guī)劃與組網設計
- OpenLayers Cookbook
- Spring Cloud微服務架構進階
- 面向云平臺的物聯(lián)網多源異構信息融合方法
- 射頻通信系統(tǒng)
- 物聯(lián)網技術與應用
- 智慧光網絡:關鍵技術、應用實踐和未來演進
- 通信原理及MATLAB/Simulink仿真
- Windows Server 2012 Hyper-V虛擬化管理實踐
- 網絡利他行為研究:積極心理學的視角
- 組網技術與網絡管理
- 商業(yè)的本質和互聯(lián)網
- 計算機通信網絡安全
- VMware vSphere 5.0虛擬化架構實戰(zhàn)指南