[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: performance of converting alist to hash table
From: |
Dai Yuwen |
Subject: |
Re: performance of converting alist to hash table |
Date: |
Tue, 18 May 2004 11:50:30 +0000 |
User-agent: |
Mutt/1.4.2.1i |
On Mon, May 17, 2004 at 07:37:43PM -0400, Miles Bader wrote:
> On Mon, May 17, 2004 at 01:43:41PM -0400, Ted Zlatanov wrote:
> > Maybe the equality test you are using is too slow?
>
> I think that's a good point -- specifying _any_ non-standard :test function
> (that is, anything except eq/eql/equal) probably slows down hashing quite a
> bit.
>
I use equal as the test function:
(setq ta (make-hash-table :test 'equal :size 7000))
But I forgot to mention: the key of hash is a Chinese GB2312 string. Does this
slow down hashing?
I decide to give up using hash. After all alist behaves like hash. All I need
is a function like gethash:
(defun get-value (key)
(cadr (assoc key alist)))
I profiled get-value and gethash, the result is acceptable, though get-value is
slower.
Best regards,
Dai Yuwen
- 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 <=
- 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