
B-Heap vs. Binary Heap (2010) - sakai
https://queue.acm.org/detail.cfm?id=1814327
======
jfarmer
This is a great article and the diagrams illustrating the difference between a
binary heap and a B-heap are awesome. The comments are amusingly negative,
too.

It's worth noting that it was published in 2010, though. The Wikipedia article
on B-heaps actually references this article:
<http://en.wikipedia.org/wiki/B-heap>

~~~
Mgccl
Good article, but it only demonstrate his ignorance on existing cache-
oblivious data structures...

~~~
jfarmer
Yes, that's what 90% of the comments on the article said, too. Welcome to the
club. :P

He's talking about people's everyday understanding of data structures,
including his own. That the data structure he described already existed when
he banged it out is beside the point; most folks don't know about it, most CS
programs don't teach it, and most software doesn't use it.

That's sort of like saying, "Well, all special relativity does is show
Einstein's ignorance of Lorentz's work."

It's true in some sense, but ultimately an unproductive sentiment.

~~~
epistasis
I think that knowing your audience goes a long way, particularly when using
"You're doing it wrong" in the title.

The audience of this article was a lot of people that knew of the problem, and
knew of research into cache-oblivouis algorithms. This is a long ways from not
citing somebody, it's preaching to somebody as if they are ignorant when
they're a fair ways ahead of you. Quite annoying when encountered.

~~~
neeee
As he says in the comments, he didn't choose the title.

------
imperio59
Thanks for the article and the comments, I had never heard of Cache Oblivious
algorithms and this article seems to indicate that others have not either:
[http://blogs.msdn.com/b/devdev/archive/2007/06/12/cache-
obli...](http://blogs.msdn.com/b/devdev/archive/2007/06/12/cache-oblivious-
data-structures.aspx)

I wonder if current popular libraries like the STL or the Java Collections
library have started to take advantage of this work yet or not...

~~~
gwern
Cache-oblivious algorithms can be pretty wacky when you're used to not
thinking about locality at all.

A mergesort can be understood by even a beginner after an hour or less in a
language like Haskell. A funnelsort...? Well, I'll put it this way: even after
reading the papers, I'm not sure how I would go about implementing it.

~~~
mtdewcmu
I glanced at the code files from the inventor. It doesn't look like the kind
of algorithm you implement yourself.

------
emin_gun_sirer
Those of you interested in cache conscious algorithm design should check out
Anthony LaMarca's thesis from 1996:
[http://homes.cs.washington.edu/~lamarca/pubs/lamarca-
thesis....](http://homes.cs.washington.edu/~lamarca/pubs/lamarca-thesis.pdf)

The article only cites papers from 1961 and 1964, and complains about how CS
departments use out-of-date machine models when teaching algorithms. This is
just not true at any of the top schools.

------
timv
There's some useful comments from last time this popped on to the HN front
page: <http://news.ycombinator.com/item?id=1426211>

------
kristopher
Here[0] is the implementation if anyone is curious.

[0] [https://github.com/varnish/Varnish-
Cache/blob/master/lib/lib...](https://github.com/varnish/Varnish-
Cache/blob/master/lib/libvarnish/binary_heap.c)

