3 ms·
I'm curious on what the performance implications are. If I have some JavaScript on a webpage that I want to "obfuscate", would using this accomplish the task?
by zatkin 12y ago
I'm curious on what the performance implications are. If I have some JavaScript on a webpage that I want to "obfuscate", would using this accomplish the task?
- alcuadrado 12y agoThe performance seriously decreases. I haven't measure how much, but I guess it'd only work for very very small scripts.
- xxs 12y agoonce the eval() invocation is complete and the code generated/compiled the performance should be the same as the code normally written. Basically it's only compiler from []{}!+ to javascript.
- calibwam 12y agoHowever, your js files would get really big, and download latency could actually be a performance drop.
- xxs 12y agoTrue, however they should be very well compressible by 'deflate' too, the main concern is the initial parsing grok by the JIT. Yet, on runtime the scripts will be good as any.
- SaturateDK 12y agohttp://jsperf.com/jsfuck-test http://jsperf.com/jsfuck-test
- calibwam 12y agoThis isn't really obfuscating, as it is very easy to get the code back into normal js.