From 904b91d95d69c56efa689820b76c318797ed6499 Mon Sep 17 00:00:00 2001 From: Ben Lesh Date: Wed, 31 Oct 2018 14:39:12 -0700 Subject: [PATCH] fixup! docs: add `Function Inlining` rules to `PERF_NOTES.md` Co-Authored-By: mhevery --- 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 21803956b5..cea21d2f12 100644 --- a/packages/core/src/render3/PERF_NOTES.md +++ b/packages/core/src/render3/PERF_NOTES.md @@ -106,5 +106,5 @@ export function i18nStartFirstTemplatePass(tView: TView, index: number, message: ## Loops -Don't use foreach, it can cause megamorphic function calls (depending on the browser) and function allocations. +Don't use `forEach`, it can cause megamorphic function calls (depending on the browser) and function allocations. It is [a lot slower than regular `for` loops](https://jsperf.com/for-vs-foreach-misko)