From 7a1d9c12632cdfebadf64a3f42505be19644564e Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Fri, 25 Sep 2026 09:44:59 +0700 Subject: [PATCH] The Map is to take the Swiss-table layout --- TODO.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TODO.org b/TODO.org index 14fa03d0..5a8a1b32 100644 --- a/TODO.org +++ b/TODO.org @@ -1264,7 +1264,8 @@ Removal landed, with the loop the spec predicted as its cost. Deferring it was what had kept the implementation free of tombstones and of Odin's backward-shift loop; taking it is taking the loop. -** TODO The Map is slower than CPython's dict at a million entries +** NEXT The Map is slower than CPython's dict at a million entries +Decided 2026-09-25: build the Swiss-table layout, one metadata byte a slot. Measured against the current Map at small, game and large sizes before and after. Keys, values and hashes are three separate runs, so a lookup that misses everything costs three cache misses where a compact dict costs two. One byte of metadata a slot — the Swiss-table arrangement — is the known answer and is not