fixup! docs: add Function Inlining rules to PERF_NOTES.md

This commit is contained in:
Miško Hevery
2018-10-31 10:47:00 -07:00
committed by GitHub
parent c026bda324
commit d4818234ed

View File

@ -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.