This make readRecord 20% faster, measured on an LTO build
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Nice improvement. Do you know how much this improves the overall parse time or compile time?
lib/Bitcode/Reader/BitstreamReader.cpp | ||
---|---|---|
135 | Similar loop unswitching optimization could be done here, but presumably not as hot. Consider implementing here too for consistency? | |
209 | Move these into the default case in your new switch below. Otherwise essentially checking for the error case multiple times. |
Comment Actions
Take Teresa's comment into account.
To answer the question on the impact on the total time: my profile shows readRecord for ~3% for an LTO link and close to %10 for a ThinLTO link.
Similar loop unswitching optimization could be done here, but presumably not as hot. Consider implementing here too for consistency?