| |
| Posted by bachmeier in reply to Vinod K Chandran | PermalinkReply |
|
bachmeier
Posted in reply to Vinod K Chandran
| On Tuesday, 11 June 2024 at 17:15:07 UTC, Vinod K Chandran wrote:
> Hi Steve,
Two reasons.
- I am writting a dll to use in Python. So I am assuming that manual memory management is better for this project. It will give finer control to me.
- To squeeze out the last bit of performance from D.
On the second point, I would be interested in hearing what you find out. In general, I have not had any luck with speeding things up inside loops using manual memory management. The only that's worked is avoiding allocations and reusing already allocated memory.
You're splitting things into GC-allocated memory and manually managed memory. There's also SafeRefCounted, which handles the malloc and free for you.
|