I've thought of doing one of these for my favourite 8-bit computer, though never actually got round to actually trying it.
How wide is a bank number? Even if it's the full 8 bits, that's only 24 bits, which is nothing these days. 64 MB for the full table, assuming 32 bits is enough to cover every offset into the JIT buffer. (Assuming max 4 GB of JIT'd code. If that isn't, perhaps 40 bits would be? 128 MB table, max 1 TByte of JIT'd code.) Would you need a hash table rather than an array?
The maximum supported size is 512 banks, so 25 bits. But searching now, I don't think there are any games bigger than 1 MiB in size (64 banks), so 22 bits, or just 16 MiB or 32 MiB of lookup table. Yeah, maybe it is not so bad to replace the HashMap with an array, especially when I am losing a significant amount of time doing HashMap look ups already.
But of course I would like to avoid using that amount of memory if possible. Maybe I will also take a look at perfect hash mapping someday.
How wide is a bank number? Even if it's the full 8 bits, that's only 24 bits, which is nothing these days. 64 MB for the full table, assuming 32 bits is enough to cover every offset into the JIT buffer. (Assuming max 4 GB of JIT'd code. If that isn't, perhaps 40 bits would be? 128 MB table, max 1 TByte of JIT'd code.) Would you need a hash table rather than an array?