3 ms·
Curious to know what people are building where you need to optimise like this? eg Struct Field Alignment https://goperf.dev/01-common-patterns/fields-alignment/
by neillyons 2y ago
Curious to know what people are building where you need to optimise like this? eg Struct Field Alignment https://goperf.dev/01-common-patterns/fields-alignment/#avoiding-false-sharing-in-concurrent-workloads https://goperf.dev/01-common-patterns/fields-alignment/#avoi...
- dundarious 2y agoFalse sharing is an absolutely classic Concurrency 101 lesson, nothing remarkable about it.
- kubb 2y agoSomething that shouldn’t be written in a GC language.
- piokoch 2y agoI don't think GC has anything to do here, doing manual memory allocation we might hit the same problem.
- Cthulhu_ 2y agoGC is not relevant in this case, it's about whether you can make structs fit in cache lines and CPU registers. Mechanical sympathy is the googleable phrase. GC is a few layers further away.