Oh, I thought of another thing!
Most data structure performance focuses primarily on speed, but in the browser, it is important to also consider the code size. So a change that (1) improves performance of a certain function and (2) increases code size may not be worthwhile for a “general purpose” implementation. Code size is definitely not a big concern in compiler literature, so I would not be surprised if it’s similar in data structures literature.
That site is pretty cool! I think my personal questions are less about learning the structures and more about evaluating implementation A vs B.
So I’d want to be able to say, my situation is roughly:
- 1,000 inserts
- 100,000 lookups
- 0 union
- 0 intersect
Then get some graphs on how different implementations might handle my particular scenario. For example, the info at the top of Data.IntMap does not comment on the relative performance of lookups, so the fact that all those other operations are faster does not help me. Only if lookups are good too.
And in the context of Elm, even if I find something that is strictly faster, it may still not be worthwhile for my particular scenario if the code is 3x larger or something like that.
So for my particular kinds of questions, I would want to start by giving ranges of estimated uses of map, insert, lookup, intersect, etc. And based on the type of my lookup key, some data structures may not work for me. (E.g. if I have user-given strings, assigning densely packed array indexes may not be worthwhile if I’m getting new values over time.)
I don’t know how niche these questions are though
I know in browsers performance is almost always dominated by DOM changes, but I wonder if WebGL people using Elm have run into similar kinds of data structure questions as in my compiler work. Not sure!