Terminology:
IIFE: (function() { code })()
PIFE: (function() { code })
Since IIFE detection would be too slow, JavaScript engines detect PIFEs to decide whether to eagerly parse + compile functions that are needed, boosting startup times.
https://v8.dev/blog/preparser
-
Show this thread
-
Replying to @mathias
Isn't the following pattern used as well? (function() { code }())
1 reply 0 retweets 0 likes
Replying to @jwajsberg
Mathias Bynens Retweeted Mathias Bynens
It is. We already make the decision when we see: (functionhttps://twitter.com/mathias/status/1118140391277117450 …
Mathias Bynens added,
6:56 AM - 16 Apr 2019
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.