TransferBoy icon indicating copy to clipboard operation
TransferBoy copied to clipboard

Use int32s whereever possible

Open joeldipops opened this issue 6 years ago • 1 comments
trafficstars

When writing new code for N64 the most overlooked optimization is using (u)int32 for every variable/parameter possible. The compiler will usually add several additional instructions to ensure that the value is only the promised "byte" or "short". Also more parameters cause more work on the stack, think of the first 4 as "free", additional parameters have a cost.

joeldipops avatar Aug 20 '19 21:08 joeldipops

First attempt, it slowed me down by an FPS or two ;_;

Must be some casting somewhere making things worse.

Arghh I hate this nothing works.

joeldipops avatar Aug 21 '19 12:08 joeldipops