nolanlawson / optimize-js

Optimize a JS file for faster parsing (UNMAINTAINED)

Home Page:https://nolanlawson.github.io/optimize-js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is the readme correct?

kurtextrem opened this issue · comments

https://docs.google.com/presentation/d/1214p4CFjsF-NY4z9in0GEcJtjbyVQgU0A-UqEvovzCs/edit#slide=id.g192721b519_1_40
this suggests V8 doesn't only look for (, but only for (function(){})() (see slide 24)

commented

That looks like V8 had already finished some optimizations.

Same as this issue, I double checked latest implementation of V8, below pattern will be treated as "likely to be called" and should do eagerly parsing:
!function (){}()

Below is the related review:
Treat a '!' preceding a function literal as eager-compile hint.