Re:1BRC Merykitty's Magic SWAR: 8 Lines of Code Explained in...
by anonymoushn on Sunday March 10, 2024 @06:35AM
(#39658127)
There isn't really a dependency there. You can scan for a bunch of delimiters and save a bunch of row start and end positions and process the rows from there.
If (unlike the solutions that won this challenge) you would like to use a hash that consumes all the bytes in the input, then scanning for all the delimiters and bucketizing strings by length also lets you avoid branch mispredictions caused by random lengths.
If (unlike the solutions that won this challenge) you would like to use a hash that consumes all the bytes in the input, then scanning for all the delimiters and bucketizing strings by length also lets you avoid branch mispredictions caused by random lengths.