3 ms·
In general it’s called “dead code elimination.” [1] It’s been around for a long time. A linker can do a basic version of this, but advanced optimizations requir
by skybrian 5y ago
In general it’s called “dead code elimination.” [1] It’s been around for a long time. A linker can do a basic version of this, but advanced optimizations require whole-program optimization and it’s not typically done since it affects compile time and binary size isn’t as important as it is for web browsers.
GWT was doing tree shaking for Java to JavaScript compilation before most JavaScript programmers had the tool chain for it.
[1] https://en.m.wikipedia.org/wiki/Dead_code_elimination https://en.m.wikipedia.org/wiki/Dead_code_elimination