From 4b97dc7637e42cf487f17ecaa537ad8802abfb9d Mon Sep 17 00:00:00 2001 From: Chang Gi Hong Date: Wed, 28 Feb 2024 19:46:45 +0900 Subject: [PATCH] Add a note on the post "Faster async functions and promises". (#737) * Add a note on the post - note for behavior changed since 5 years ago --- src/blog/fast-async.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/blog/fast-async.md b/src/blog/fast-async.md index b623a3885..34609f87c 100644 --- a/src/blog/fast-async.md +++ b/src/blog/fast-async.md @@ -156,6 +156,10 @@ We’ve also been working on a new garbage collector, called Orinoco, which move And last but not least, there was a handy bug in Node.js 8 that caused `await` to skip microticks in some cases, resulting in better performance. The bug started out as an unintended spec violation, but it later gave us the idea for an optimization. Let’s start by explaining the buggy behavior: +:::note +**Note:** The following behavior was correct according to the JavaScript spec at the time of writing. Since then, our spec proposal was accepted, and the following "buggy" behavior is now correct. +::: + ```js const p = Promise.resolve();