[svn:parrot] r49133 - trunk/src
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Sat Sep 18 05:55:10 UTC 2010
Author: plobsing
Date: Sat Sep 18 05:55:10 2010
New Revision: 49133
URL: https://trac.parrot.org/parrot/changeset/49133
Log:
assume serialized hashes do not contain duplicates.
this avoids costly probing compares.
2.8% speedup to rakudo startup
Modified:
trunk/src/hash.c
Modified: trunk/src/hash.c
==============================================================================
--- trunk/src/hash.c Sat Sep 18 05:07:29 2010 (r49132)
+++ trunk/src/hash.c Sat Sep 18 05:55:10 2010 (r49133)
@@ -802,9 +802,8 @@
STRING * const key = VTABLE_shift_string(interp, info);
const INTVAL i = VTABLE_shift_integer(interp, info);
const INTVAL hashval = key_hash_STRING(interp, key, hash->seed);
- HashBucket *b = parrot_hash_get_bucket_string(interp, hash,
- key, hashval);
- parrot_hash_store_value_in_bucket(interp, hash, b, hashval,
+ /* serialized hashes assumed not to contain duplicates */
+ parrot_hash_store_value_in_bucket(interp, hash, NULL, hashval,
(void *)key, (void *)i);
}
More information about the parrot-commits
mailing list