Most of these are about enabling inlining, in a couple of cases moving code to a header and throughout switching to CARBON_DCHECK. The code size of CARBON_CHECK seems to make inliing quite unreliable. I'm going to think about whether there are ways to improve this, but a reasonably small number of these seem worth switching for now to get some compile time savings.
Also moves VLOG out of the hot path which helps a bit as well.
All combined, this net a bit over 10%, although it varies a bit exactly how much. We're now pretty consistently over 800k lines/second for check in the compilation benchmark for files >=4k lines, which makes me happy. That's remarkably close to our original target.
Not really planning to keep optimizing here, just was glancing at the profile and many of these stood out to me and were easy to fix.
Most of these are about enabling inlining, in a couple of cases moving code to a header and throughout switching to
CARBON_DCHECK
. The code size ofCARBON_CHECK
seems to make inliing quite unreliable. I'm going to think about whether there are ways to improve this, but a reasonably small number of these seem worth switching for now to get some compile time savings.Also moves VLOG out of the hot path which helps a bit as well.
All combined, this net a bit over 10%, although it varies a bit exactly how much. We're now pretty consistently over 800k lines/second for check in the compilation benchmark for files >=4k lines, which makes me happy. That's remarkably close to our original target.
Not really planning to keep optimizing here, just was glancing at the profile and many of these stood out to me and were easy to fix.