4 Aug 21:22
[PATCH] Don't do unnecessary work: clrhash on empty hash
From: Erik Huelsmann <ehuels <at> gmail.com>
Subject: [PATCH] Don't do unnecessary work: clrhash on empty hash
Newsgroups: gmane.editors.j.devel
Date: 2008-08-04 19:26:27 GMT
Subject: [PATCH] Don't do unnecessary work: clrhash on empty hash
Newsgroups: gmane.editors.j.devel
Date: 2008-08-04 19:26:27 GMT
The attached patch doesn't do much for the build-time of ABCL (not as
much as the 10% when the equivalent patch went into SBCL), but it's
still nice not to do too much work.
Bye,
Erik.
Index: HashTable.java
===================================================================
RCS file: /cvsroot/armedbear-j/j/j/src/org/armedbear/lisp/HashTable.java,v
retrieving revision 1.57
diff -u -r1.57 HashTable.java
--- HashTable.java 6 Mar 2007 11:40:49 -0000 1.57
+++ HashTable.java 4 Aug 2008 19:20:09 -0000
@@ -150,6 +150,8 @@
public synchronized void clear()
{
+ if (count == 0) return;
+
for (int i = buckets.length; i-- > 0;)
buckets[i] = null;
count = 0;
-------------------------------------------------------------------------
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=/
(Continue reading)
RSS Feed