Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Short array optimization for std.bitmanip.BitArray #9588

Open
dlangBugzillaToGithub opened this issue Feb 12, 2012 · 1 comment
Open

Short array optimization for std.bitmanip.BitArray #9588

dlangBugzillaToGithub opened this issue Feb 12, 2012 · 1 comment

Comments

@dlangBugzillaToGithub
Copy link

bearophile_hugs reported this on 2012-02-12T11:59:28Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=7488

CC List

Description

An optimization for std.bitmanip.BitArray: when BitArray.length <= (size_t.sizeof * 8), then BitArray.ptr stores the bit themselves (so ptr is in a union with a size_t).

If the array of bits is short, this saves a GC allocation, increasing performance and reducing the amount of memory used and garbage produced.
@dlangBugzillaToGithub
Copy link
Author

lovelydear commented on 2012-04-19T08:54:38Z

See related 7487 and 7490

@LightBender LightBender removed the P4 label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants