From 4aca6c5ef8d80e5460468f6d4195ee3efaa65641 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 23 Jul 2019 23:03:15 -0400 Subject: [PATCH] Adds a note of admission here. --- Processors/68000/Implementation/68000Storage.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Processors/68000/Implementation/68000Storage.hpp b/Processors/68000/Implementation/68000Storage.hpp index 5d1a1ba4d..14d27a035 100644 --- a/Processors/68000/Implementation/68000Storage.hpp +++ b/Processors/68000/Implementation/68000Storage.hpp @@ -334,6 +334,14 @@ class ProcessorStorage { A program represents the implementation of a particular opcode, as a sequence of micro-ops and, separately, the operation to perform plus whatever other fields the operation requires. + + TODO: this struct, as currently formed, is 48 bytes large on my 64-bit Intel + machine — 8 bytes for each of the pointers, plus 8 bytes for the non-pointer fields. + That means that the Program[65536] table is 3mb large. Far too huge for a cache. + So slim this, even if it makes things much more painful to dereference. + + (Aside: the compiler seems to prefer 8-byte alignment so eliminating or slimming the + non-pointer fields doesn't seem to be helpful immediately.) */ struct Program { MicroOp *micro_operations = nullptr;