Hi Joel, Ole

What Joel writes about tradeoffs is true, but the most important thing to
know is that the REBOL hash! datatype only hashes strings (a little missing
documentation). For other datatypes, you just get a more expensive block
with no speed benefits. Jim has said that he will extend it to hash numbers
as well, but no schedule on that.

Cheers
-Larry

PS Joel, I have really enjoyed your recent essays and benchmarks.

---------excerpt from original message
> >
> > BTW, using a hash! for the "keys" array would probably be a better
> > idea than just using a block!, as I currently do. _If_ find/only
> > works faster on hash! lists, that is (it should be, but I don't
> > know).
> >
>
> Disclaimer: I've not done the empirical testing of this hypothesis
> for the REBOL implementation of  hash! , so PLEASE take this as
> speculation.
>
> My general experience is that hashing vs. array/list lookup is
> subject to tradeoffs.  There is overhead (both space and time)
> with hashing, which makes it perform more poorly than simpler
> but straightforward lookup schemes for small cases.  As the size
> of the data collection grows, however, that overhead amortizes
> nicely.  Ultimately, for "large enough" collections of data,
> the hash table beats array/list algorithms -- the best way to
> determine how large is large enough, of course, is to run some
> benchmarks, which I'd like to do some time when my higher
> priorities have been handled (and there are LOTS of them! ;-)
>
> -jn-
>

Reply via email to