On Wed Feb 5 19:08:55 2025 +0000, Brendan Shanks wrote:
IMO, this feels like a micro-optimization that isn't worth the complexity and risk to save 23 cycles per call. If it makes a meaningful difference in a game benchmark it could be worth it, but otherwise it feels better to chase bigger gains.
FWIW I did some more testing on this, and it is possible to reliably extract out some low single digit percentage improvements in frame times on the FFXIV benchmark when CPU bound. The difference between `gettimeofday()` and `__commpage_gettimeofday()` is very hard to measure in a real-world application, except maybe with an Instruments trace.
The difference is easier to measure between `clock_gettime()` and `__commpage_gettimeofday()` directly though, so I think this is probably still worth it.
I also weakly linked in `__commpage_gettimeofday()` in the latest version, mitigating any future possible risk as well.