[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: performance of converting alist to hash table
From: |
Eli Zaretskii |
Subject: |
Re: performance of converting alist to hash table |
Date: |
16 May 2004 13:18:07 +0200 |
> Date: Sun, 16 May 2004 09:55:22 +0000
> From: Dai Yuwen <address@hidden>
>
> 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))))
Did you try `mapcar' and its variants?