Runtime formatting and logging#2792
Merged
IntegratedQuantum merged 4 commits intoPixelGuys:masterfrom Apr 3, 2026
Merged
Conversation
Member
Author
|
Time to get those compile-times down |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is something I've been wanting to try for a long time, and with some trickery the results are surprisingly good: No major changes in the interface, decent compile time performance gains.
The biggest surprise to me was that I can mostly reusing the formatting infrastructure from the standard library with only the formatting specifier being needed at comptime.
This should be merged after the release in case there are some edge cases where I broke something. Note that with runtime formatting, we'll only get errors at runtime about incorrect formatting specifiers. But I think this is worth the improvement to compile times:
Over 2 seconds saved in debug mode. And this is just the beginning: We can reuse this for bufPrint and allocPrint and other print throughout the code. Overall I'd expect we can probably save another few seconds from the llvm build times and maybe 300 ms from the x86_64 build time.
Remaining work: