HN user

leiradel

53 karma

Generalist programmer working in the game industry. I blog at https://leiradel.github.io/

Posts3
Comments3
View on HN

I was a new hire at a game development company. My first task was to optimize a function that was consuming more cycles than all the other ones. The function was responsible for dispatching Objective-C++ method calls.

After a quick debug session, the problem was clear: the methods to call was being searched using a linear search. I changed the search to use a hashtable and the function disappeared from the list of most CPU consuming functions.

After running both implementations for a couple of weeks to make sure my implementation was right, I made a PR, which wasn't approved. The manager said my change was too risky to go to production, even though the implementation was simple and I spent two weeks making sure it was ok. They're probably still using the linear search.

The .data section contents are already in place when the kernel.bin file is loaded by the GPU. This is made by the linker script.