apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ami Ganguli <hse_...@yahoo.co.uk>
Subject precalculating hash values for apr_hash_t
Date Sat, 17 Apr 2004 11:52:34 GMT
Hi folks,

I'm just starting to use the apr library and my first
task is to implement a hash based dictionary.  I use
hash keys to speed up string comparisons, so my keys
all have pre-computed hash values.

It probably makes little difference for performance,
but it doesn't feel right that apr_hash_set keeps
recomputing my hash values, when I've already done the
work and remembered the hash.

If I write my own version of apr_hash_set, perhaps:

apr_hash_set_precompute (
  apr_hash_t *ht, 
  unsigned int hash,
  const void *key, 
  apr_ssize_t klen, 
  const void *val

would there be any interest in including it with the


Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 

View raw message