4 ms·
Reflection in general isn't the problem, but if you specifically use reflection to look up a method in your program, then dead code elimination gives up. https
by jrockway 5y ago
Reflection in general isn't the problem, but if you specifically use reflection to look up a method in your program, then dead code elimination gives up. https://go.dev/src/cmd/link/internal/ld/deadcode.go https://go.dev/src/cmd/link/internal/ld/deadcode.go
Taught to me on HN recently: https://news.ycombinator.com/item?id=30041763 https://news.ycombinator.com/item?id=30041763
- nhoughto 5y agoInteresting detail, didn’t realize go dead code analysis was this easily made ineffective. 52MB for ec2 SDK is a big chunk of code that must be mostly dead/unused. Seems like eventually this should become a priority for library writers to support dead code analysis, otherwise going to get worse and worse..