On Sunday, 10 December 2023 at 18:16:05 UTC, Nick Treleaven wrote:
You can call `alloca` as a default argument to a function. The
memory will be allocated on the caller's stack before calling
the function:
https://github.com/ntrel/stuff/blob/master/util.d#L113C1-L131C2
I've just tested and it
On Sunday, 10 December 2023 at 16:08:45 UTC, Bastiaan Veelo wrote:
On Sunday, 10 December 2023 at 15:31:55 UTC, Richard (Rikki)
Andrew Cattermole wrote:
It will be interesting to hear how dcompute will fare in your
situation, due to it being D code it should be an incremental
improvement
On Wednesday, 6 December 2023 at 16:28:08 UTC, Mike Parker wrote:
One way to do that in D is to use `alloca`, but that's an issue
because the memory it allocates has to be used in the same
function that calls the `alloca`. So you can't, e.g., use
`alloca` to alloc memory in a constructor, and
On Sunday, 10 December 2023 at 17:11:04 UTC, Siarhei Siamashka
wrote:
On Sunday, 10 December 2023 at 15:08:05 UTC, Bastiaan Veelo
wrote:
The compiler can check if `scope` delegates escape a function,
but it only does this in `@safe` code --- and our code is long
from being `@safe`. So it was a
On Sunday, 10 December 2023 at 15:08:05 UTC, Bastiaan Veelo wrote:
1) Missing `scope` storage class specifiers on `delegate`
function arguments. This can be chalked down as a beginner
error, but also one that is easy to miss. If you didn't know:
without `scope` the compiler cannot be sure that
On Sunday, 10 December 2023 at 15:31:55 UTC, Richard (Rikki)
Andrew Cattermole wrote:
It will be interesting to hear how dcompute will fare in your
situation, due to it being D code it should be an incremental
improvement once you're ready to move to D fully.
Yes, dcompute could mean
That is awesome to hear!
If the move towards ldc has the potential to half your run time, that is
quite a significant improvement for your customers.
It will be interesting to hear how dcompute will fare in your situation,
due to it being D code it should be an incremental improvement once
On Wednesday, 6 December 2023 at 16:28:08 UTC, Mike Parker wrote:
Bastiaan reported that SARC had been testing their D codebase
(transpiled from Pascal---[see Bastiaan's DConf 2019
talk](https://youtu.be/HvunD0ZJqiA)). They'd found the
multithreaded performance worse than the Pascal version.