The Truth about the Fast Inverse Square Root on the N64

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Is "now try it with the fast inverse sqrt" the programmer version of how every musician content creator is asked/forced to attempt Rush E and other meme songs

TypingHazard
Автор

It's crazy to think just what a modern computer might be capable of if we had the time and expertise to optimize code to this degree...

ENCHANTMEN_
Автор

Silas' idea with the error cancelling is very cool, there are probably many other examples where we can reduce the error of one problem by dividing it into two sub-problems with opposite error

ethanpayne
Автор

Nice video!
Just one small point: If you want to use invsqrt(x) to calculate sqrt(x), you can use x*invsqrt(x) instead of 1/invsqrt(x). That might save a few cycles? But I still agree that the quake3 fast inverse square root algorithm is probably not that useful on N64.

possible-realities
Автор

I'm kind of surprised it was made popular by Quake III. I could've sworn Mike Abrash put it in the original Quake, but it's been years since I saw the source.

Gideon_Judges
Автор

I didn't actually expect it to work at all. Because I remember you said that square roots on the N64 are relatively fast. Of course Kaze will find a way to eek out that tiny extra bit of performance and then some.

mrmimeisfunny
Автор

Both editions of the book Hacker's Delight mention the fast inverse square root (or as they call it, an Approximate Reciprocal Square Root Routine) and give various improvements of the algorithm. In the books they already mentioned FISR without Newton iterations:
> deleting the Newton step results in a substantially faster function with a relative error within ±0.035, using a constant of 0x5F37642F.

simjans
Автор

I like to think that whatever piece of his soul John Carmack lost when Oculus got acquired by FB/Meta ended up possessing Kaze

Jrg
Автор

RAM Bus is my favorite recurring character on this show, glad to see Them back!

cozmictwinkie
Автор

I was certain it was absolutely "useless" in the Nintendo 64 hardware, I'm amazed you actually found a place to use it!

Also, you know your audience very well, @06:58 I chuckled and @07:23 I almost laughed. Great content!

prgnify
Автор

The truth about why my dad never came back from the grocery store 😢😢😢
Edit: Yooo my mind was blown w/ Silas’s idea. Mathematically it seems obvious but getting that much accuracy improvement with the 2 fourth-root calcs multiplied together is insane!
Thanks for the good content as always!

Flamefreeze
Автор

I know the project is aimed at maintaining real hardware compatibility, but maybe consider to patch a n64-emu and give one extra rambus to the console to see how far your game can go?

wfzyx
Автор

Kaze Emanuar: The only person that can explain to me how to optimise a 26 year old game in high technical detail I can't even begin to understand, while keeping me invested until the end.

SilicatYT
Автор

The levels in the beginning of this video look really pretty! This is starting to look like one of the best Mario games ever designed... And it's a rom hack of Mario 64!

supersmily
Автор

I don't know where your journey takes you, but the amount of data you took upon you, is painfully large. You are like a character from literature, the giver. In the story a certain character carries the memory of the world as it was. At this point it's safe to bet you are in the top 5 most knowledgeable n64 programming/development person in the world.

mr_art
Автор

I used to think there was no reason for a Mario 64 sequel to exist, but seeing how much there was to improve.on the base engine, and how many level possibilities it opens up, it's obvious they should have made one

chungus
Автор

Damn, Kaze's take on fast inverse square root is really interesting.

leroymilo
Автор

8:57 ooo, reminds me of Romberg integration (more generally Richardson extrapolation), add together approximations at different step sizes to cancel out one error term in the taylor expansion. Takes me back to intro to scientific computing :)

johanngambolputty
Автор

babe wake up, Kaze just uploaded a new video

notarandom
Автор

You know, for as terrible as most everything in the world is right now, the fact that we have people like Kaze who is relentlessly optimizing Mario 64 and making great romhacks is a welcome ray of sunshine. Never stop buddy!

unclerukmer