Optimizing Bytecode by Manipulating Source Code

1 · Jake Wharton · April 2, 2019, midnight
This post is a follow-up to “The Economics of Generated Code” which argued that spending time optimizing generated code is more worthwhile than the same optimizations done in manually-written code. The second example from that post dealt with looking up views, checking for null, and potentially throwing an exception. In an effort to reduce the impact of the generated exception message string, each was split into a prefix which will be de-duplicated and the view ID name which was effectively free...