Sorry for another self-promo but I finished this benchmark today and thought it might be interesting to some people here.
This is great!
I still remember a post from mraleph who wrote about how List is / was more highly optimised by the compiler relative to other collections, so if you naively chose other data structures in an attempt to improve performance on the basis of abstract complexity you might actually make it worse.
Oooh, that’s a good point! Maybe my next toy benchmark should be whether `.contains` / .add / .removeLast is really always faster in Set / Queue than in List (and for what sizes)?
Do you remember if Slava gave a concrete example?
Interesting, dart is not making defensive copies for forEach like other languages.
Saw this response from Slava:
Ah, you updated your article with a reference to it also. I just saw it by my RSS feed to his blog and remembered reading your article from here. ![]()
Yes! I was gonna post it here but forgot. It’s also linked from the article.