summaryrefslogtreecommitdiff
path: root/src/lisp/ao_lisp_mem.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-11-18 22:41:46 -0800
committerKeith Packard <keithp@keithp.com>2016-11-18 22:43:28 -0800
commitee6ff123352c9184b239ff890a11d8bfa97c4ffc (patch)
treeddaa25da921131b9cf8903cbf53d471f5a519bc5 /src/lisp/ao_lisp_mem.c
parenta3b2c0fd6f9a3a75ddf11e13dc1e3aebf69f4692 (diff)
altos/lisp: Sort frames by atom
Fortunately, the collector always retains the relative order between addresses, so we can sort based on the atom address itself. This reduces the time spent looking for names in larger (e.g. global) frames. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp_mem.c')
-rw-r--r--src/lisp/ao_lisp_mem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lisp/ao_lisp_mem.c b/src/lisp/ao_lisp_mem.c
index e8907cf6..1f09ede8 100644
--- a/src/lisp/ao_lisp_mem.c
+++ b/src/lisp/ao_lisp_mem.c
@@ -218,9 +218,11 @@ static const void ** const ao_lisp_cache[] = {
(const void **) &ao_lisp_frame_free_list[1],
(const void **) &ao_lisp_frame_free_list[2],
(const void **) &ao_lisp_frame_free_list[3],
+ (const void **) &ao_lisp_frame_free_list[4],
+ (const void **) &ao_lisp_frame_free_list[5],
};
-#if AO_LISP_FRAME_FREE != 4
+#if AO_LISP_FRAME_FREE != 6
#error Unexpected AO_LISP_FRAME_FREE value
#endif