3 ms·
The C# implementation looks flawed (uses reference types for vectors etc). Using value types and .NET Core should give a much better result than that. Will try
by alkonaut 8y ago
The C# implementation looks flawed (uses reference types for vectors etc). Using value types and .NET Core should give a much better result than that. Will try to remember doing a PR.
- kyberias 8y agoTested this on the same machine with Ubuntu for Windows + old .NET Core 1.0. 3 min 20 seconds.
- ygra 8y agoI've just tried out a bit with .NET Core 2.2. Baseline of the non-multithreaded variant on my machine: 1m56s Making Vector3 a struct: 1m3s Making Vector3 a readonly struct: 1m1s Making Hit and Ray a struct: 1m26s Will test more tomorrow, I guess, but the most obvious change already yields a 2× speedup. This was also without any profiling, so I don't even know what I did there.