Re: Global thread-local free-list allocator

2023-03-18 Thread Witold via Digitalmars-d-learn
On Friday, 17 March 2023 at 07:56:28 UTC, Herbie Melbourne wrote: On Thursday, 16 March 2023 at 20:53:28 UTC, Witold wrote: I ported a classic DeltaBlue benchmark to D, and for allocations I use a mix of malloc/free (for structs with some trailing inline arrays), and new for some other structs

Re: Global thread-local free-list allocator

2023-03-17 Thread Herbie Melbourne via Digitalmars-d-learn
On Thursday, 16 March 2023 at 20:53:28 UTC, Witold wrote: I ported a classic DeltaBlue benchmark to D, and for allocations I use a mix of malloc/free (for structs with some trailing inline arrays), and new for some other structs and arrays. After running it, it felt kind of slow (I did not co

Re: Global thread-local free-list allocator

2023-03-16 Thread Witold via Digitalmars-d-learn
On Thursday, 16 March 2023 at 20:53:28 UTC, Witold wrote: It crashes at `new_.value`, as `new_` is `null` It looks like this: ```d alias VariableAllocator = ThreadLocal!(FreeList!(Mallocator, Variable.sizeof, unbounded)); ``` should be this instead: ```d alias VariableAllocator = ThreadL

Global thread-local free-list allocator

2023-03-16 Thread Witold via Digitalmars-d-learn
I ported a classic DeltaBlue benchmark to D, and for allocations I use a mix of malloc/free (for structs with some trailing inline arrays), and new for some other structs and arrays. After running it, it felt kind of slow (I did not compare it to any other language yet, so no idea if it is act