my stab at knucleotide benchmark
based on the submission by Josh Goldfoot which I started off of...
Use dotnet build -c release
and friends / VS 2017 / Whatever you like
Alternatively, if you wish to publish as a self contained binary, use either:
dotnet publish -c release -r linux-x64
for publishing on linux -or-
dotnet publish -c release -r win10-x64
for windows
once compiled, the mkdata.exe
can be used as such:
cd mkdata
dotnet run 25000000 > knucleotide-input25000000.txt
to generate enough data to start having fun with (namely to generate the same amount of data that was used in the submussion I based this one
./shame < knucleotide-input25000000.txt
or (this works better with profilers of sorts):
./shame knucleotide-input25000000.txt
This submission does a few things "better", namely:
-
RefDictionary.cs: a hacked up version of the coreclr
Dictionary<T,K>
with the rough following mods:- ref-return based
this[TKey key]
operator - remove the concurrent use detection logic
- constrain
TKey
/TValue
to implementIEquatable<T>
, eliminatingEqualityComparer<T>.Default
- Remove the
_version
tracking - Remove
Keys
/Values
properties of the Dictionary
- ref-return based
-
Some more complex / yet more efficient chunking/ordering of the parallelization code that reduces the "straggeler effect" of having one task/thread work on a more complex part of the problem while all other tasks/threads have completed