- or download this
# 15 input files, 1 thread, clang++ -std=c++20
strtok_r 9.655 seconds
strchr 8.713 seconds
- or download this
while ( ::fgets(line, MAX_LINE_LEN_L, fh) != NULL ) {
found = ::strchr(line, '\t');
...
line[found - line] = '\0'; // word
...
}
- or download this
::memcpy( fixword.data(), line, found - line );