October 24, 2017
https://issues.dlang.org/show_bug.cgi?id=17881

--- Comment #10 from Andrei Alexandrescu <andrei@erdani.com> ---
(In reply to Steven Schveighoffer from comment #8)
> What I am looking for,
> though, is the high-level API of "I have 20 million T's I want to allocate,
> give me them properly allocated and typed one at a time".

This issue should be closed. A good allocator should be able to handle repeated allocations of the same size without this kind of hint.

--
October 25, 2017
https://issues.dlang.org/show_bug.cgi?id=17881

--- Comment #11 from Steven Schveighoffer <schveiguy@yahoo.com> ---
(In reply to Andrei Alexandrescu from comment #10)
> This issue should be closed. A good allocator should be able to handle repeated allocations of the same size without this kind of hint.

I'm all for a solution that doesn't need hints. As far as I can tell, that solution hasn't been disclosed yet. If you know how to write a "good allocator" I really think you should do it, it would do wonders for D's GC performance. Certainly, feel free to take this ER down in the event that becomes available.

--
October 28, 2017
https://issues.dlang.org/show_bug.cgi?id=17881

--- Comment #12 from Rainer Schuetze <r.sagitario@gmx.de> ---
The current GC already does something in that regard as it pre-assigns a new memory page to a free-list of elements of the size of the last request.

The GC locking overhead can be reduced by helping the inliner a bit with some assembly. I have tried that for Win64 recently and the benchmarks showed an improvement of about 5%.

--
October 28, 2018
https://issues.dlang.org/show_bug.cgi?id=17881

Stanislav Blinov <stanislav.blinov@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stanislav.blinov@gmail.com

--- Comment #13 from Stanislav Blinov <stanislav.blinov@gmail.com> ---
Created attachment 1713
  --> https://issues.dlang.org/attachment.cgi?id=1713&action=edit
Example of paged allocation with GC

Jumping in a year later almost to the hour, I'll start with a disclaimer: I
agree with Andrei that such functionality in general is best left for a custom
allocator API.
That said, having a straightforward utility for chunked GC allocations in
Phobos or DRuntime would benefit users who don't necessarily want to import or
deal with custom allocators for "just that one allocation" (scripts,
prototyping, etc.).

Attached is an implementation of the sketch suggested in previous comments; see comments in the code about certain implementation/DRuntime quirks. This implementation on my machine is about 10x faster than piecewise allocation with both dmd and ldc; it's still slower, of course, than a wholesale preallocation, but at least should be on the same order of magnitude, unless you go for astronomical amounts of instances.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=17881

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
October 15
https://issues.dlang.org/show_bug.cgi?id=17881

Steven Schveighoffer <schveiguy@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=2504

--
1 2
Next ›   Last »