This was my attempt at the 1 billion row challenge. It was a great experience and I highly recommend you give it a shot.
Because there are multiple file I think its important you know the timeline of progress:
base_line.cppmapped_memory.cppcustom_table.cppmultithreaded.cpp
Each one got progressivly faster with the final landing at ~1.03 seconds on my machine.
I compiled the file using clang so nothing complicated just do the following and run it and you will be good to go.
clang++ -O3 file.cpp -o file
./file
I expect I will come back time to time to see how I can improve the code as my knowledge expands but as of right now it is a good saving point.