3 ms·
blah, looked at the other c# implementations and saw you already changed the array initialisation, please ignore that part :D Edit: yeah, pretty much ignore me
by mattchamb 13y ago
blah, looked at the other c# implementations and saw you already changed the array initialisation, please ignore that part :D
Edit:
yeah, pretty much ignore me, the array initialisation for implementation 1 of F# and C# is almost incomparable to that of the C implementation; which is why the first implementations are so much slower.
If you wanted them to be more directly comparable then for C, you should have an array of pointers which you then fill with pointers to malloc'd addresses.
I should have noticed that sooner... i guess this is why you dont read code at 1am.
- logicchains 13y agoNo problem. The style of implementations 1 of F# and C# is meant to mimic the style of Java1, the implementation from the original post that inspired the benchmark. F#2 and C#2 use a faster form of allocation. JavaUnsafe uses an implementation more directly comparable to C, but it's actually slower than the Java2 implementation.