HNHacker News
TopNewBestAskShowJobs

rodrigodd

44 karma · joined September 2, 2023

submissionscomments
rodrigodd··on GameRoy: JIT Compilation in High-Accuracy Game Boy Emulation
> How come you don't consider conditional branches to be terminating instructions of your basic blocks?

Initially I was doing that, but it was making tight loops too slow. And what I am referring to as a "block" was not a basic block, but a entire compilation unit.

rodrigodd··on GameRoy: JIT Compilation in High-Accuracy Game Boy Emulation
I am already using a non-cryptographic hasher. In fact, I am not doing any hashing at all, I am just assuming that the input is already random enough, and use a Hasher that just copies the input to output. But I still didn't measure the performance of that, so that may be something silly to do.
rodrigodd··on GameRoy: JIT Compilation in High-Accuracy Game Boy Emulation
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.