Hacker News new | ask | show | jobs
by incrudible 946 days ago
First of all, you're probably bundling your code, stripping comments, have tree-shaking eliminate parts of it. That's already a form of obfuscation. Then, minification will affect performance of parsing, it can even affect whether a function gets inlined by the JIT compiler, because character length is a very cheap heuristic. Whether I care about that or not is my judgement call.
1 comments

> character length is a very cheap heuristic

Unless your interpreter is trying to optimize text blocks, op-code length will be cheaper and way easier to develop.

The existence of interpreter opcodes implies you have already compiled the code for the interpreter, but with this heuristic you can send this function straight to JIT.