Article: The Lost Art of Structure Packing
Guillaume Piolat
first.last at gmail.com
Mon Nov 2 10:54:18 UTC 2026
On Monday, 2 November 2026 at 08:36:56 UTC, FinalEvilution wrote:
> If your random number generation is a big bottleneck you could
> try
> rewriting it using SIMD (Single instruction, multiple data)
> intrinsics.
> I've been using
> https://code.dlang.org/packages/intel-intrinsics to
> write a very simple image codec and I've managed to get some
> really
> good performance with it. Results may vary.
Another trick in the book is to bundle your allocations together,
with padding for alignment.
dplug:core has MergedAllocation to help with that, but you can
also do it manually like stb_image_resize2.h, it helps almost
every time.
More information about the Digitalmars-d
mailing list