Re:Closure Compiler: High-level overview of a compilation job
by malisper on Monday July 04, 2016 @05:45AM
(#12029684)
How much of a speedup do you get by adding JSDoc type annotations?
[ Parent
| on HN ]
Re:Closure Compiler: High-level overview of a compilation job
by localvoid on Monday July 04, 2016 @06:59AM
(#12029975)
It depends on the code base. When I've migrated from js code base with 100% gcc type coverage to TypeScript, gcc(without tsickle) in advanced mode stopped rewriting many methods into simple functions, didn't minified many symbols, with 100% type coverage gcc minified all symbols.
When I've tried synthetic UI benchmarks, code with 100% type coverage on desktop machines had the same performance, on old mobile phones it was 0-10% faster(depends on the use case).
Minified code size with 100% type coverage were slightly smaller on small projects, but with the API for building UI Components that I've used, minified code with 100% type coverage should be significantly smaller on a large project.