Enlightenment CVS committal
Author : cedric
Project : e17
Module : proto/eina
Dir : e17/proto/eina/src/lib
Modified Files:
eina_stringshare.c
Log Message:
After benchmarking, the superfast hash function does impact performance
as it better spread data in the hash table.
===================================================================
RCS file: /cvs/e/e17/proto/eina/src/lib/eina_stringshare.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- eina_stringshare.c 6 Aug 2008 18:15:19 -0000 1.7
+++ eina_stringshare.c 8 Aug 2008 16:07:32 -0000 1.8
@@ -140,7 +140,7 @@
if (!str) return NULL;
slen = strlen(str) + 1;
- hash_num = eina_hash_djb2(str, slen) & 0x3FF;
+ hash_num = eina_hash_superfast(str, slen) & 0x3FF;
for (el = share->buckets[hash_num]; el; pel = el, el = el->next)
{
el_str = ((char *)el) + sizeof(Eina_Stringshare_Node);
@@ -182,7 +182,7 @@
if (!str) return;
slen = strlen(str) + 1;
- hash_num = eina_hash_djb2(str, slen) & 0x3FF;
+ hash_num = eina_hash_superfast(str, slen) & 0x3FF;
for (el = share->buckets[hash_num]; el; pel = el, el = el->next)
{
el_str = ((char *)el) + sizeof(Eina_Stringshare_Node);
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs