Better HN
topnewbestaskshowjobs
Log inSign up

leiradel

53 karma · joined Jan 9, 2019 (7y ago) · 6 submissions

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

comment 2y ago · link · parent

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.

2.

How the Raspberry Pi Stubs Work(leiradel.github.io ↗)

2 points · by leiradel · 7y ago · discuss

3.

How the Raspberry Pi Stubs Work(leiradel.github.io ↗)

3 points · by leiradel · 7y ago · discuss

comment 7y ago · link · parent

This is exactly what the linker script does: https://github.com/LdB-ECM/Raspberry-Pi/blob/master/Multicor...

The resulting binary is loaded as a whole to RAM, there are no intermediary representation of the executable like a PE or ELF, and there are no relocations; everything is already resolved during link time.

comment 7y ago · link · parent

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.

6.

Booting the Raspberry Pi(leiradel.github.io ↗)

40 points · by leiradel · 7y ago · 4 comments