Hacker News new | ask | show | jobs
by yatac42 2294 days ago
> C++ and the shortest, simplest possible quicksort

wk_end was talking about "functional pseudo-quicksort" on immutable linked lists. You're presumably talking about a proper quicksort on mutable arrays. That's comparing apples to oranges.

And even if you weren't, how is that an argument? Person A says "X is faster than Y", then person B says "Actually I just ran X and it took 10x longer than Y" and then you say "Well Z, which isn't even part of this discussion, is 1000x faster than both X and Y, so your argument is invalid". How does that follow?

1 comments

It means that speed is not a very interesting basis for comparing them. If you cared much about speed, you would look elsewhere.
Again I want to emphasize that you were comparing different algorithms on different data structures. It's like someone made a benchmark using the naive recursive Fibonacci definition and then you implemented the iterative version in another language and concluded from that that the other language must be much faster. The different algorithm is what gave you (most of) the speed up, not the language.

I mean, I don't doubt that C++ is in fact faster than Haskell, just not by that much.

Their criticism is fair: I have been making a performance argument. I do think they've misinterpreted my performance argument, though, which I'll get to. (There's a lot of backlog I need to catch up with; this thread is very large and my typing speed is significantly faster than the speed at which I can think.)