Branch: Tag:

2015-12-17

2015-12-17 16:15:37 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Strings: Speeded up safe_debug_findstring() a factor htable_size.

This makes pikes compiled --with-debug useable again...

1392: Inside #if defined(PIKE_DEBUG)
     int safe_debug_findstring(const struct pike_string *foo)   { -  unsigned INT32 e; +  size_t h; +  struct pike_string *p; +     if(!base_table) return 0; -  for(e=0;e<htable_size;e++) +  h = HMODULO(foo->hval); +  for(p=base_table[h];p;p=p->next)    { -  struct pike_string *p; -  for(p=base_table[e];p;p=p->next) -  { +     if(p==foo)    {    return 1;    }    } -  } +     return 0;   }