Replies: 4 comments 8 replies
-
Thanks for the benchmarks. Indeed, if possible, use a mutable vector. It is impossible to beat that with an immutable vector :) Which operations are you benchmarking? |
Beta Was this translation helpful? Give feedback.
-
It was just a clone of your benchmark, adding 1_000_000 ints. In this run, I compared mutable https://gist.github.com/NWoodsman/2bb2875b020435ee0811f86acd890fd2 Funny that the half-way interruption actually improved performance slightly. |
Beta Was this translation helpful? Give feedback.
-
You might try to implement a builder for the other immutable vectors. I think that would give you a good speedup as well! |
Beta Was this translation helpful? Give feedback.
-
I benchmarked the vecs, and got this result using
BenchmarkDotNet
:Demonstrates that the vecs are really good compared to dot net's default
ImmutableList<T>
however a bog standard mutable list is still the king.Beta Was this translation helpful? Give feedback.
All reactions