[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: performance of converting alist to hash table
From: |
Adrian Aichner |
Subject: |
Re: performance of converting alist to hash table |
Date: |
Sun, 16 May 2004 17:51:07 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chayote, windows-nt) |
Andreas Schwab <address@hidden> writes:
> Dai Yuwen <address@hidden> writes:
>
>> I use `mapc' like this:
>> (defun convert-alist-to-hash (table w)
>> (mapc (lambda (e)
>> (puthash (car e) (cadr e) table))
>> w))
>>
>> Almost the same time needed. (I made a mistake in the previous email, it
>> should be 30 seconds instead of 15.)
>
> How did you create the hash table? You should probably start with a
> larger hash table than the default to avoid too many resize operations.
>
> Andreas.
Here's what I get for
M-x profile-sexp RET (convert-alist-to-hash (make-hash-table :size 70000)
a-list)
based on these definitions:
convert-alist-to-hash.el
Description: application/emacs-lisp
Profiling results on a Dell C600 with 850MHz:
txtpQ0E7KYhXC.txt
Description: Text document
--
Adrian Aichner
mailto:address@hidden
http://www.xemacs.org/
- performance of converting alist to hash table, Dai Yuwen, 2004/05/16
- Re: performance of converting alist to hash table, Ted Zlatanov, 2004/05/17
- Re: performance of converting alist to hash table, Miles Bader, 2004/05/17
- Re: performance of converting alist to hash table, Dai Yuwen, 2004/05/18
- Re: performance of converting alist to hash table, Stefan Monnier, 2004/05/18
- Re: performance of converting alist to hash table, Dai Yuwen, 2004/05/19
- Re: performance of converting alist to hash table, Kenichi Handa, 2004/05/19
- Re: performance of converting alist to hash table, Dai Yuwen, 2004/05/26
- Re: performance of converting alist to hash table, Kenichi Handa, 2004/05/27
Re: performance of converting alist to hash table, David Kastrup, 2004/05/18