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
437 stars 43 forks source link

Change paralell to threads #6

Closed denisenko93 closed 8 months ago

denisenko93 commented 8 months ago

Change paralell to threads. Save ~200 msec in my machine 1.7 sec to 1.5 sec

buybackoff commented 8 months ago

I tried that even in the first attempt: https://github.com/buybackoff/1brc/commit/f1b81f8a590a8a42d5be8358e6ba30489e678592#diff-c23b3a4b594cd434906b503ac730336620a2a9854b42a783b2978c254b358a30R111-R114

Simple tasks, long running tasks, threads, PLINQ - it makes no difference.

Do you have turbo boost enabled on your CPU? If so, the numbers could be very unreliable.

denisenko93 commented 8 months ago

Turbo boost is enabled in my processor. Could you run my project to prove or disprove the hypothesis?

buybackoff commented 8 months ago

Could you run my project to prove or disprove the hypothesis?

It doesn't work this way. It's my project and I said already that it does not matter, tried multiple times. PLINQ looks nicer.