This make readRecord 20% faster, measured on an LTO build
Details
Diff Detail
Event Timeline
Nice improvement. Do you know how much this improves the overall parse time or compile time?
lib/Bitcode/Reader/BitstreamReader.cpp | ||
---|---|---|
134–152 | Similar loop unswitching optimization could be done here, but presumably not as hot. Consider implementing here too for consistency? | |
225–226 | Move these into the default case in your new switch below. Otherwise essentially checking for the error case multiple times. |
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.
ReadVBR64?