A C++ (Boost) implementation for One Billion Row Challenge
The usual CMake style build
cd <folder-containing-source>
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=c:\vcpkg\scripts\buildsystems\vcpkg.cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release
msbuild onebrc.sln /p:Configuration=Release
or
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
ninja
Gratefully acknowledging the following influences
- Keeping the temperatures as ints till the time of actually printing out the result is copied from buybackoff's super impressive dotnet implementation
- Gopal convinced me to do a preprocessing to create self-contained batches.
Following are the timings on my machine
Implementation | Time |
---|---|
java baseline from gunnarmorling | ~2 min |
c++ implementation from this repo | 2.8s |
rust implementation from this repo | 4.3s |