You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current JerryScript impl just checks the length between 2 to 10, and an optimized memcmp to match one of keywords or not, then I think this method on v8 should work on JerryScript, too.
I just took a quick look on this. If I understand this correctly then it will be only a parse time improvement. IMHO, the source code parsing is fast enough, the gain won't be measurable. Have you investigated what would be the cost (in memory usage and binary size) of using a perfect hash?
v8 improves the special keyword match via the perfect hash algorithm, and document it at https://v8.dev/blog/scanner#keywords, for implementation of v8, see keywords-gen.h.
The current JerryScript impl just checks the length between 2 to 10, and an optimized
memcmp
to match one of keywords or not, then I think this method on v8 should work on JerryScript, too./cc @algebrait @LaszloLango @legendecas
The text was updated successfully, but these errors were encountered: