Ladies, gentlemen, clankers, and Sega Dreamcast developers, it is with great pride (and exhaustion) that I can finally announce the official release of SH4ZAM Version 0.11.0!
The time has come to go update your KOS-Ports, everyone, cuz the GAINZ HAVE JUST DROPPED, along with a slew of new API additions, bugfixes, and more!
1) The Scalar API now offers 1:1 replacements for nearly all single-precision FP routines from standard C's <math.h>, INCLUDING the extended POSIX routines.
My replacements are SIGNIFICANTLY faster on the SH4, due to using function inlining, fast floating-point approximations, dedicated SH4 instructions, and not blowing cycles doing stupid shit like validating user input or setting errno.
2) All rotation transforms (from both the Matrix and XMTRX APIs), have now had a second optimization pass and are now written in 100% pure hand-optimized, hand-scheduled SH4 ASM, with MEGA GAINZ for rotations about principal axes, euler angle rotations, angle-axis rotations, and quaternion rotations.
3) GANZY AF and ergonomic Billboard transforms have been added to both the Matrix and XMTRX APIs.
4) Vector inversion, division, and square root operations have now made substantial GAINZ using the new pseudo-SIMD trick I recently discovered, which interleaves calculating resulting lanes with both dedicated instructions and fast approximates, utilizing separate, parallel pipeline stages.
5) Vector and Quaternion APIs now feature routines for rotating operands directly in-place, optimized for one-off rotations. These avoid setting up matrices or clobbering XMTRX, which win for batch rotation operations.
6) SH4ZAM now offers conversion adapter routines and operators which provide a zero-overhead way to convert between layout-compatible vector and quaternion types, WITHOUT pissing off compilers by violating strict aliasing rules in either C and C++. You cannot legally just do C-style or reinterpret_cast<>-ing between types!
This is incredibly useful for interoperability between SH4ZAM's API and existing types, when using SH4ZAM to accelerate codebases using other math APIs or define their own types.
7) Newly enhanced AGENTS.md file teaches your audacious clankers how to properly use my shit and prevents them from LARPing at you with made up performance metrics based on bullshit emulators, simulators, or--my absolute favorite--your clanker giving you performance advice by simply counting instructions.
I now offer cycle-level evidence of my GAINZ and challenge your audacious ones to ACTUALLY BENCHMARK THEIR SHIT ON REAL HW using the cycle-accurate perf counters in the SH4ZAM benchmark suite before trying to convince you they know the SH4 better than my contributors and me do...
Because I've now witnessed way too many projects missing out on GAINZ, due to clankers convincing their completely ignorant users to favor AI-generated routines which slop up their codebases and measure SLOWER on physical HW 9 times out of 10. NO MORE! NOT WITHOUT PROOF!
Full release notes, along with cycle-accurate benchmarks of each SH4ZAM routine and the resulting GAINZ (versus CGLM, raymath, and vanilla C routines) can be found here:
https://github.com/gyrovorbis/sh4zam/releases/tag/v0.11.0
