4 ms·
I don't know about LLVM but GCC has had something like this for years as a standard optimization feature. You create a binary with special profiling code which
by jonathanstrange 6y ago
I don't know about LLVM but GCC has had something like this for years as a standard optimization feature. You create a binary with special profiling code which writes to a file. After running the program a few times, you recompile with optimization that uses this file. I forgot the flags though.
Personally, I'm more interested in executable optimization. It decompiles an executable, performs whole-program optimization, and re-compiles it. I'd love to tinker around with optimizing other people's binaries (e.g. games) for my machine. There is something like that for LLVM but it's very experimental.
- Const-me 6y agoIt's called profile-guided optimization. And it fails for C when the source data changes significantly, compared to the inputs used by developers when they were building the binary.
- jonathanstrange 6y agoYes indeed.