Thanks Clay. So now it's sure linux entries will have a great advantage on windows entry (because of 16 bytes per line). In this challenge, if the files are big (and they should if you want to do "almost" 10 seconds processing), then the reading and writing result file is not small. (about the same time as the search in my first try, with a test file of 1000000 entry and 300000 search keys).
Too bad linux competitors will have such a great advantage over windows one! :-( (they can read the keysearch file with some large binary chunk and just patch "0" byte at the end of each string)
Please correct me if I'm wrong. Here's the way I understand this:
What you're saying is that linux users can read the input file into memory in large chunks, thus, cutting down on the input time, then replace every 16
th byte with '\0' and use a formula like i*16 to get the i
th search string. But I fail to see why you can't do the same on a windows machine using i*17 instead...