Comment

Comment by midnightclubbed

One tidbit that may be of interest (or not) is that if you see doubles being used in N64 C code it is almost certainly accidental. Doubles were slow on the N64 mips CPU but the mips C compiler would happily output them and promote surrounding floats to keep the precision it assumed you wanted.

float myValue = x_float + y_float * y_float * 3.0;

Looks ok, except the constant is a double. Performance killer.

You'd get pretty good at seeing the missing f (and we eventually wrote some simple tooling to find functions using doubles) but I'm sure a number of games shipped with accidental double calculations.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton