C
C#7mo ago
stuw

Parallel.For but that doesn't allocate.

Parallel.For works, but weirdly enough the execution time hasn't changed at all. I'm thinking it might be because of the whole 13kb it's allocating? Is there any equivalent to parallel.for that isn't as bad?
No description
3 Replies
stuw
stuw7mo ago
^Literally an empty for loop right now that's taking this long
Denis
Denis7mo ago
Are you profiling in release mode?
Honza K.
Honza K.7mo ago
what are you comparing it against? if you want to benchmark something, try using this https://github.com/dotnet/BenchmarkDotNet
GitHub
GitHub - dotnet/BenchmarkDotNet: Powerful .NET library for benchmar...
Powerful .NET library for benchmarking. Contribute to dotnet/BenchmarkDotNet development by creating an account on GitHub.