Branch: Tag:

2012-04-18

2012-04-18 16:44:53 by Henrik Grubbström (Grubba) <grubba@grubba.org>

stralloc: Adjusted the new_hashkey_depth threshold.

Increase the threshold from 16 * MAX_AVG_LINK_LENGTH to 128 * MAX_AVG_LINK_LENGTH.
This fixes a performance problem where Roxen started ~15 times slower.

664: Inside #if undefined(HASH_PREFIX)
  #ifndef HASH_PREFIX    /* These heuristics might require tuning! /Hubbe */    if((need_more_hash_prefix_depth > MAX_AVG_LINK_LENGTH * 4) || -  (need_new_hashkey_depth > MAX_AVG_LINK_LENGTH * 16)) +  (need_new_hashkey_depth > MAX_AVG_LINK_LENGTH * 128))    {    /* Changed heuristic 2005-01-17:    *