15 ms·
This is an interesting article, and a "devector" is something I've never heard of or considered before, so I'll leave critique of the data structure itself to o
by agf 10y ago
This is an interesting article, and a "devector" is something I've never heard of or considered before, so I'll leave critique of the data structure itself to others. But I have some constructive criticism of how the data is presented. Since the graphs / performance comparisons are such a large part of the post, I think it's relevant.
First of all, and most simply, when presenting multiple charts please use the same colors for the same lines on each chart. Here, the charts without the "vector" line use a different color scheme, making it harder to compare them at a glance.
Second, absolute timings don't matter here, only relative timings do, so showing absolute time on the Y-axis doesn't really make sense. Instead, I would use percentage from a baseline of one of the data structures. I think choosing the "deque" line for that purpose would make the most sense, given that it's the standard data structure from double-ended access.
Here's a rough version of what that looks like for the first chart -- https://goo.gl/bg5mrN https://goo.gl/bg5mrN -- Hopefully it makes the relative speeds of the different solutions more clear (I only put in the data for "deque" and "devector").
- xentronium 10y ago> Second, absolute timings don't matter here, only relative timings do, so showing absolute time on the Y-axis doesn't really make sense. Instead, I would use percentage from a baseline of one of the data structures. I think choosing the "deque" line for that purpose would make the most sense, given that it's the standard data structure from double-ended access. It's useful to measure the real asymptotic complexity.
- ktRolster 10y agoSecond, absolute timings don't matter here, only relative timings do, so showing absolute time on the Y-axis doesn't really make sense I like to see the real timings, though. It helps me get a sense for how long real-world tasks take. In this one, we can see that things were happening on the order of nanoseconds.
- scott_s 10y agoAgreed - I tend to prefer absolute timings for similar reasons. Both are valid ways to present data, and I have chosen both for different reasons in the past.
- agf 10y agoThe primary purpose of the graph is to show relative timings, so I think it's important to make that clear. A logarithmic Y-Axis makes that really hard to judge. If you wanted to show absolute timings, then I would say a separate graph with time / N on they Y-axis would be the right way to do it -- you could see how the time per operation changed as you increased N.
- ktRolster 10y agoA logarithmic Y-Axis makes that really hard to judge. Come on, we're programmers, get good at math!
- agf 10y agoThanks, I'm plenty good at math. The point of a graph is to display information visually -- minimal math should be required. If what you want is the numbers, then a graph doesn't help you -- use a table instead.
- ktRolster 10y agoPretty clearly your "understand graphs with logarithmic axes" could use some work.