Re: Dict vs array performance
- From: "Donal K. Fellows" <donal.k.fellows@xxxxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2011 05:31:13 -0700 (PDT)
On Aug 30, 11:57 am, Rich <google-em...@xxxxxxxxx> wrote:
Is there a reason why this difference in speed should exist?
This is because [info exists] is bytecode-compiled to be about as
efficient as an array variable read[*], and [dict exists] is not (the
variable holding the dictionary has to be read, then the [dict]
command invoked - which dispatches to the [dict exists] implementation
- then a hash lookup performed).
Donal.
[* Minimum one hash table lookup, perhaps more depending on caching. ]
.
- References:
- Dict vs array performance
- From: Rich
- Dict vs array performance
- Prev by Date: Dict vs array performance
- Next by Date: Tclhttpd crypt library seg fault on 64-bit linux
- Previous by thread: Dict vs array performance
- Next by thread: Tclhttpd crypt library seg fault on 64-bit linux
- Index(es):
Relevant Pages
|