Re: GETF Speedup?

"Tim Bradshaw (as tfb at tfeb dot org)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
On 11 Oct 2025, at 16:17, Yuri Davidovsky (as work at disclosure dot ie) <[email protected]> wrote:
> 
> Anyway, the lesson is: if you need fast key access, use lists, as strange as it sounds, just make sure they are built in a single sitting.

Here's LW's performance for a lookup miss with various structures of various sizes.

The way I did this was to build a table (plist, hash table, alist) containing entries from 0 to n-1, and then probe for n, averaging this over this a large number of times of course.  There is some loop overhead but it is identical for each type.

The behaviour of plists is interesting: I assume this is some cache in the machine.  Alists might do the same thing with a longer spine (but do not seem to).

Also below that is the same thing but for a hit at the half-way point, and first elt hit.

This is all an M1.

--tim
plot-miss.png (image/png, 31.9 KB) - not displayed
plot-half.png (image/png, 34 KB) - not displayed
plot-first.png (image/png, 31.3 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.