buybackoff / 1brc

1BRC in .NET among fastest on Linux
https://hotforknowledge.com/2024/01/13/1brc-in-dotnet-among-fastest-on-linux-my-optimization-journey/
MIT License
441 stars 44 forks source link

Sum should be long #3

Closed nietras closed 10 months ago

nietras commented 10 months ago

@buybackoff max measurement is 99.9 or 100, 1B * 100 > int.MaxValue, so for the general case this would result in overflow. Using long probably won't hurt perf, significantly.

buybackoff commented 10 months ago

Good catch! Perf impact is invisible.