Guile Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scheme style auto-resizing hashtable
On 26 Oct 1998, Harvey J. Stein wrote:
> STk's hash tables are faster than Guile's (on the order of 20% faster
> when computing runtime-overhead, and on the order of 50% when doing
> runtime-gc-overhead, assuming (gc-run-time) returns time in
> milliseconds).
>
my hash tables are a good deal faster than Guile's:
the heart of the test (run ten times):
;; <hash table is created>
(for-each (insert-entry mytab insert-proc) lines)
(for-each (find-entry mytab find-proc) lines)
(for-each (insert-entry mytab insert-proc) lines)
(for-each (find-entry mytab find-proc) lines)
...
for x in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
head -n "${x}0000" rand-nos.bak | tail -n 10000 > rand-nos
echo "hashtab"
./myguile -s httest.scm
echo
echo "Guile hash"
./myguile -s gtest.scm 8219
echo
done
hashtab
*time: 539*
Guile hash
*time: 810*
hashtab
*time: 517*
Guile hash
*time: 808*
hashtab
*time: 549*
Guile hash
*time: 809*
hashtab
*time: 554*
Guile hash
*time: 808*
hashtab
*time: 537*
Guile hash
*time: 810*
hashtab
*time: 535*
Guile hash
*time: 809*
etc.
Guile Home |
Main Index |
Thread Index