Skip to content

append flags of subclasses to the unused bits of bitfields in Expression - #23519

Open
rainers wants to merge 1 commit into
dlang:masterfrom
rainers:appendBitfields
Open

append flags of subclasses to the unused bits of bitfields in Expression#23519
rainers wants to merge 1 commit into
dlang:masterfrom
rainers:appendBitfields

Conversation

@rainers

@rainers rainers commented Aug 3, 2026

Copy link
Copy Markdown
Member

reduces memory used in derived classes, including padding bytes after flags

A minor downside is that non-zero initialization has to be moved to the ctor. For expressions this only occured once.

reduces memory used in derived classes, including padding bytes after flags
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

DMD perf check

Metric Base PR delta
compile hello.d (instr) 215.9 M 215.9 M -0.03%
compile hello.d -O (instr) 234.5 M 234.4 M -0.02%
compile Phobos (instr) 5,077.4 M 5,079.0 M +0.03%
compile Phobos codegen (instr) 1,453.3 M 1,455.0 M +0.12%
compile vibe.d (instr) 15,136.3 M 15,138.8 M +0.02%
dmd binary size (stripped) 6.92 MB 6.92 MB -0.06%
hello binary size 0.72 MB 0.72 MB 0.00%
peak RSS (compile hello.d) 44 MB 43 MB -0.30%
peak RSS (compile Phobos) 631 MB 631 MB -0.07%
peak RSS (compile vibe.d) 1980 MB 1977 MB -0.16%

@rainers

rainers commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Improvements are a bit disappointing, probably because most class instance sizes don't jump into the previous 16-byte category used by bump-pointer-allocation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant