/top/
/new/
/best/
/ask/
/show/
/job/
^
slacker news
login
about
←back to thread
How I cut GTA Online loading times by 70%
(nee.lv)
3883 points
kuroguro
| 1 comments |
28 Feb 21 19:38 UTC
|
HN request time: 0s
|
source
Show context
luckystarr
◴[
28 Feb 21 20:26 UTC
]
No.
26296728
[source]
▶
>>26296339 (OP)
#
Well, that's embarrassing. I can't even imagine the level of shame I would feel if I had written the offending code.
But, you know, premature optimization yadda yadda.
replies(5):
>>26296911
#
>>26298188
#
>>26301348
#
>>26302026
#
>>26308204
#
Cakez0r
◴[
01 Mar 21 12:18 UTC
]
No.
26302026
[source]
▶
>>26296728
#
It's not a premature optimisation to use a hashset instead of a list though!
replies(1):
>>26302165
#
1.
ufo
◴[
01 Mar 21 12:35 UTC
]
No.
26302165
[source]
▶
>>26302026
#
The bug is more devious than that. The code looks linear at a glance and the culprit is that sscanf is actually O(N) on the length of the string. How many people would expect that?
ID:
GO
↑