News for hackers. Stuff that matters.
Re:Double-ended vector – is it useful? by agf on Monday May 23, 2016 @01:30AM (#11752088)
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 -- Hopefully it makes the relative speeds of the different solutions more clear (I only put in the data for "deque" and "devector").

Re:Double-ended vector – is it useful? by ktRolster on Monday May 23, 2016 @03:50AM (#11752482)
Second, 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.

Re:Double-ended vector – is it useful? by agf on Monday May 23, 2016 @12:06PM (#11754739)
The 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.

Re:Double-ended vector – is it useful? by ktRolster on Monday May 23, 2016 @04:33PM (#11756730)
A logarithmic Y-Axis makes that really hard to judge.

Come on, we're programmers, get good at math!

Re:Double-ended vector – is it useful? by agf on Monday May 23, 2016 @10:23PM (#11758584)
Thanks, 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.

Re:Double-ended vector – is it useful? by ktRolster on Tuesday May 24, 2016 @03:58AM (#11759686)
Pretty clearly your "understand graphs with logarithmic axes" could use some work.
Re:Double-ended vector – is it useful? by scott_s on Monday May 23, 2016 @09:12AM (#11753597)
Agreed - 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.
Re:Double-ended vector – is it useful? by xentronium on Monday May 23, 2016 @03:47AM (#11752477)
> 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.