-
Notifications
You must be signed in to change notification settings - Fork 806
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopted explicit buffers for low/mid-level attrs
It's really frustrating that it's impossible to create an uninitialized expression with the scope of a compound-literal... (I'm going to ignore that this is technically possible with alloca.) The lack of uninitialized compound-literals forces each of our attribute lists to make a decision: 1. Use an implicit buffer and pay for zero-initialization? or 2. Use an explicit buffer, adding code noising and risking out-of-date buffer sizes. As a compromise, this commit adopts explicit buffers in most of the low/mid-level layers. Where the code is already pretty noisy, but also heavily scrutinized and iterated over to reduce code/stack costs. This leaves the high-level layers with the hopefully safer and more readable implicit buffers. You can see this zero initializing has a surprisingly high code cost, for what is otherwise a noop: code stack before: 33828 2632 after: 33656 (-0.5%) 2632 (+0.0%)
- Loading branch information
Showing
1 changed file
with
54 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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