[self-interest] embedding based prototype languages
James McCartney
asynth at io.com
Thu Nov 7 03:30:21 UTC 2002
On Wednesday, November 6, 2002, at 03:43 PM, Steve Dekorte wrote:
> A perfect hash would take care of that(I use them in Io)
I'm not really sure that the perfect hash as you have implemented them
really buys you anything. You use a prime sized table and the %
operator instead of using a power of two sized table and masking. Mod %
is a pretty slow operation. In the time it takes to do the % operation
you could probably have chained along once. With a 0.5 load factor and
separate chaining, the average chain length is 1.27 . So I'd think that
your perfect hash is not really winning on performance, but is losing
big on space.
--
--- james mccartney james at audiosynth.com <http://www.audiosynth.com>
SuperCollider - a real time synthesis programming language for the
PowerMac.
<ftp://www.audiosynth.com/pub/updates/SC2.2.16.sea.hqx>
More information about the Self-interest
mailing list