|
|
|
|
|
by bjoli
2349 days ago
|
|
I have met many that are generally bad at comparing constant factors and even worse at understanding what computers are fast at. At school I had a friend implement a Fibonacci heap (which is O(1) or amortized O(1) in every step) for a simple thing and didn't bother to benchmark it against a simple vector based binary heap. It was slower by one order or magnitude. Only twice have I had to use something else than a simple binary heap due to cache issues. |
|
But yeah, they're one of the classical examples of "faster on paper, slower in practice" algorithms. Just use a binary (or d-ary) heap.