From d4818234edde8ea57c5a60af8d9aa3c5b26ef4d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=A1ko=20Hevery?= Date: Wed, 31 Oct 2018 10:47:00 -0700 Subject: [PATCH] fixup! docs: add `Function Inlining` rules to `PERF_NOTES.md` --- packages/core/src/render3/PERF_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/render3/PERF_NOTES.md b/packages/core/src/render3/PERF_NOTES.md index 909d278a49..ff8e7d0790 100644 --- a/packages/core/src/render3/PERF_NOTES.md +++ b/packages/core/src/render3/PERF_NOTES.md @@ -71,7 +71,7 @@ Avoid recursive functions when possible because they cannot be inlined. ## Function Inlining VMs gain a lot of speed by inlining functions which are small (such as getters). -This is because the cost of the value retrieval (getter) is ofter way less than the cost of making a function call. +This is because the cost of the value retrieval (getter) is often way less than the cost of making a function call. VMs use the heuristic of size to determine wether a function should be inline. Thinking is that large function probably will not benefit inlining because the overhead of function call is not significant to the overall function execution.