Hacker News new | ask | show | jobs
by neillyons 444 days 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/#avoi...
2 comments

False sharing is an absolutely classic Concurrency 101 lesson, nothing remarkable about it.
Something that shouldn’t be written in a GC language.
GC 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.
I don't think GC has anything to do here, doing manual memory allocation we might hit the same problem.