[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: performance of converting alist to hash table
From: |
David Kastrup |
Subject: |
Re: performance of converting alist to hash table |
Date: |
18 May 2004 14:23:46 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Dai Yuwen <address@hidden> writes:
> Dear all,
>
> I'm trying to convert a large alist(nearly 7000 elements in it) to a
> hash table. But I found the performence of my function is poor: on a
> Celeron 333MHz, 196M memory system, it'll take 15 seconds to finish
> converting.
>
> This is the function:
>
> (defun convert-alist-to-hash (table w)
> (let ((l w))
> (while l
> (setq char (car (car l))
> key (car (cdr (car l)))
> l (cdr l))
> (puthash char key table))))
>
> And how I call the function:
>
> (convert-alist-to-hash ta
> '(("w1" "aaaa")
> ("w2" "aa")
> ("w3" "aak")
> ...))
Did you byte-compile the function?
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- Re: performance of converting alist to hash table, (continued)
- 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 <=