Cleans up several oversized functions across std::hash (SHA-256, Streebog, BLAKE3) and std::compression (ZIP, Deflate): - #3487
Merged
Conversation
Merge `_transform` and `_transform_unaligned` so the 64-round body is only emitted once, handling alignment directly during the initial 16-word buffer load.
Convert `@g_n` and `@_streebog_stage2` from macros to `@noinline` functions to prevent the transform loop from expanding multiple times in `update` and `streebog_final_private`.
Pass pointers rather than slices into `compress_pre` to avoid bounds checking on round indexing, and convert `compress_in_place` and `compress_xof` into functions instead of inline macros.
Split out central directory parsing, EOCD discovery/writing, and AE-X setup from `open`, `close`, and `open_reader` into private helpers to make the main control flow easier to follow.
Extract token encoding and RLE compression helpers from `emit_block`, and use a temporary slice rather than `List` in `pkg_merge`.
Member
Author
Hyperfine shows 5.9% faster builld times for the stdlibhyperfine \
--warmup 5 \
--runs 100 \
--prepare 'git checkout bloat >/dev/null 2>&1' \
'./build/c3c compile hello.c3 -O1 --strip-unused=no -g0' \
--prepare 'git checkout master_upstream >/dev/null 2>&1' \
'./build/c3c compile hello.c3 -O1 --strip-unused=no -g0' |
Darvisim
reviewed
Aug 30, 2026
…er allow the compiler to decide.
Collaborator
|
I removed some |
Member
Author
👍️ Synthetic benchs consistently regressed O2/O3 by about 3–4%, while O1 stayed flat. |
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.
@noinlinefunctions and pointer passing.open,close,open_reader) and Deflate (emit_block,pkg_merge) functions into private helpers.Reduces frontend IR instruction counts without affecting runtime performance or behavior.