HackerTrans
TopNewTrendsCommentsPastAskShowJobs

leiradel

no profile record

comments

leiradel
·2 वर्ष पहले·discuss
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.