coffeecup
coffeecup copied to clipboard
Optimize using function inlining
Putting this here for future reference:
There currently is an issue with the optimizer, it doesn't do exactly the same tag parsing as the regular code because it replaces the regular calls with equivalent code. The correct solution is to replace calls with the end result if the call is static, using function inlining.
I had a look at doing that but it's a bit too much to take on for me right now. UglifyJS doesn't seem to have something like that out of the box and it should really be done by it and not the coffeecup optimizer.
Closure can do it: https://developers.google.com/closure/compiler/docs/api-tutorial3#enable Haven't tested that though.