3 ms·
In general, in a multi-core/massively-concurrent&¶llel world, copying small, immutable data-structures is preferred. The big reason is cache hits and minimi
by heyiforgotmypwd 7y ago
In general, in a multi-core/massively-concurrent&¶llel world, copying small, immutable data-structures is preferred. The big reason is cache hits and minimizing contention for cache lines. If you have small data structures at different addresses (that map to different cache lines), then the memory subsystem isn't stepping all over itself with RAR/WAR/RAW hazards because the copies of data structure became essentially independent of each other after the copy finished and wrote-back to L2/L3.