News for hackers. Stuff that matters.
Re:Problems with Hash Tables by RiderOfGiraffes on Friday January 08, 2010 @03:40PM (#1040378)
Hmm.

  > You can't argue without evidence ...
I guess as a mathematician I find evidence based arguments unconvincing, and exposition of principles more interesting. I'm now aware of the issues (although in truth I already was before reading this article) and so if implementing my own hash tables would know what to be wary of, and be ready to do some research, analysis and measurements.

But each to their own. I think we'll simply have to agree to disagree.

Re:Problems with Hash Tables by donw on Friday January 08, 2010 @04:30PM (#1040478)
As a mathematician, I find evidence-based arguments very convincing... where do you think that QED comes from, the planet of magic unicorns?

Purely mathematical proofs are nothing but supplying a pile of evidence, in the form of theorems and facts that both the proof-reader and proof-writer agree on, to support the argument that the proof is attempting to make.

What you have done in your article is this:

"X implies Y, QED."

And when people pointed this out, you balked, rather than writing a follow up that looked like this:

"X may imply Y under many circumstances. Take X. A, B, C, and Q are very common implementations of X, and all of them do Y, based on the following analysis..."

Re:Problems with Hash Tables by RiderOfGiraffes on Friday January 08, 2010 @04:41PM (#1040503)
My article?

But leaving that aside, I simply don't understand your points at all. In what way is a mathematical proof "a pile of evidence"? Consider, as a simple, single example the Banach-Tarski theorem. To help me understand you, perhaps you could explain how the proof of that is "a pile of evidence."

As I said elsewhere, I'm baffled by the responses here, so I'm not going to reply any more until, and if, I understand the points of view being expressed.

EDIT: speeling cerrocted

Re:Problems with Hash Tables by joe_the_user on Friday January 08, 2010 @03:59PM (#1040419)
Wait,

Arguing from principle is great but ...not only does he not give numerical evidence, he also doesn't give evidence in terms of describing which commonly used libraries or applications use what hashing method.

Re:Problems with Hash Tables by neilc on Friday January 08, 2010 @03:57PM (#1040416)
I don't see much exposition of principles going on when the author asserts that hash functions are much slower than comparison functions, for example. If you're going to make an empirical argument, you need empirical evidence.
Re:Problems with Hash Tables by RiderOfGiraffes on Friday January 08, 2010 @04:37PM (#1040496)
I'm baffled by some of the comments here, I really am. I'm going to leave this for a bit and come back later to see if I can make sense of it. Clearly people disagree with me, but it seems to me that there are several principles and concerns that are validly raised.

This is an opinion piece - he doesn't like hash tables. For him personally, he prefers not to use them and instead to use other structures such as balanced trees. He says that there are gotchas with hash-tables that aren't always realised by those who don't read the small print and take care. That seems unassailable to me. There are gotchas.

He gives an example of a bad hash-function, and points out that you need good ones. Designing a good hash function is part-art, part-science, and can be very hard. Certainly it deserves a full scholarly article and justice couldn't be done in a blog like this.

You've highlighted:

   > the author asserts that hash functions are
   > much slower than comparison functions, for
   > example.
He said:

  > hash functions have to be blindingly fast - because
  > comparisons are already really fast.
That seems pretty clear to me. The reasons are then expanded, but the point remains. Crypto-hash functions are not fast, and yet I've seen them suggested as good hash functions. In many cases, though, they're not fast enough.

But this isn't really the place for a full point-by-point discussion of the issues. I think the piece makes useful and interesting points. It's not a journal article, it's a blog piece that allows the author to vent his prejudices with some supporting arguments.

If want it done properly, read Knuth. I think many of the criticisms here are mis-placed.

Re:Problems with Hash Tables by joe_the_user on Friday January 08, 2010 @05:03PM (#1040542)
In your modded-down post, I think you were intending to mean numeric evidence like bench-marks but you actually wrote that you weren't convinced by evidence, period.

The author makes some logical arguments, which could be considered evidence. But as the GP points out, a lot of his assertions at least seemed to lack both numeric and logical evidence - so your assertion comes-off a bit muddle headed.

I found some of the article's points interesting too but I don't think this is problem people are having with this earlier post.

Re:Problems with Hash Tables by scott_s on Friday January 08, 2010 @04:46PM (#1040515)
I think the real objection is that it's a meandering rant, not a well-structured essay explaining the pitfalls of using hash tables.