r/programming • u/danielcw189 • Sep 08 '26
video on improving performance of arctan for Nintendo 64 by Kaze Emanuar "spent weeks to save 100 Microseconds"
https://www.youtube.com/watch?v=U2K44nC8c8g
259
Upvotes
59
u/danielcw189 Sep 08 '26
to clarify: the full title of the video is "He spent weeks to save 100 Microseconds". The video is by Kaze Emunar, but he didn't do the lion-share of the work here.
164
u/bwainfweeze Sep 08 '26
TLDR: Found an arctan approximation that saves a kilobyte of cache, which reduces memory contention for the rest of the game.
Mario 64 uses a lookup table for arctan, trading time for space, but the processor is almost never saturated while the memory bus often is.
17
u/floodyberry Sep 08 '26
looks like unreal's custom atan2 was for compiler/library bug reasons, not performance, it just happened to be faster
also weird that unreal hasn't switched to using (sin|cos|tan)pi
25
u/levodelellis Sep 08 '26
I see kaze, I know I'm in for a good time
1
u/iTiraMissU Sep 09 '26
Did I always misread his YouTube name as “Kaze Emulator” or did he change his channel name recently? I feel so dumb right now.
-22
u/dsrules Sep 09 '26
This guy is obviously smart and knows ultra64 in and out but he shouldn’t act like HE did it when it’s the work of others mostly.
-46
u/NoHurry28 Sep 09 '26
I wish people used AI to do shit like this and make all our code better instead of vibing out slop making all of our code worse
-69
u/Slight-Bluebird-8921 Sep 08 '26
this guy is pure boy who cried wolf
every 3 days he releases a video where he says he improved the performance of mario64 by 300% and then the game runs exactly the same
shut up already geezus
0
u/[deleted] Sep 09 '26
[deleted] — view deleted comment