- 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
推薦閱讀
- 廣電5G從入門到精通
- 物聯網短距離無線通信技術應用與開發
- Mastering Machine Learning for Penetration Testing
- 網絡故障現場處理實踐(第4版)
- JBoss EAP6 High Availability
- 計算機網絡工程實用教程(第2版)
- Mastering JavaFX 10
- 數字調制解調技術的MATLAB與FPGA實現:Altera/Verilog版(第2版)
- 新手易學:新手學淘寶開店
- 物聯網工程概論
- 云工廠:開啟中國制造云時代
- Microservices Development Cookbook
- 加密與解密實戰全攻略
- 5G新型多址技術
- 結網@改變世界的互聯網產品經理(修訂版)