14 ms·
Just in theory: pointer/capacity pair is atomic, then you read len non-atomically and check it's less than cap before using it. Slice header today puts len befo
by twotwotwo 5y ago
Just in theory: pointer/capacity pair is atomic, then you read len non-atomically and check it's less than cap before using it. Slice header today puts len before cap, but, like, if we're dreaming.
You'd probably hit other walls. I'm def. not trying to say it's straightforward!