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.
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.
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.