Hacker Newsnew | past | comments | ask | show | jobs | submit | rodrigodd's commentslogin

> 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.


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.


Sorry, in the blog post you were talking about the HashMap being expensive, and I didn't spot one of the usual "cheap" hashing libraries being in use. That's where I got wondering if you'd missed an easy boost.


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.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: