blog post about how you can make your gc code faster
Guillaume Piolat
first.last at spam.org
Wed Nov 9 11:55:28 UTC 2022
On Monday, 7 November 2022 at 14:34:38 UTC, Adam D Ruppe wrote:
> Putting aside new GC implementation tweaks like I discussed
> last week, and not just switching to other functions, this week
> I wanted to lecture a bit about how you can reduce your GC
> pause times in stock D today:
>
> http://dpldocs.info/this-week-in-d/Blog.Posted_2022_11_07.html
> By far, the biggest benefit you can tweak in D's gc is making
> your bulk allocations be completely pointer-free, since then it
> is entirely removed from the scan job, saving potentially
> significant amounts of time.
I've been avoiding void[] for this reason (I mean, void[] _could_
contain pointers), but I think I'm cargo-culting this?
If I do:
ubyte[] arr = new ubyte[100_000_000];
void[] arr2 = cast(void[]) arr; // will this still avoid
scanning?
Does the GC still know that this area is NO_SCAN?
More information about the Digitalmars-d-announce
mailing list