Another rabbit hole, so now it is a blog post. "C++ vector math library codegen in Debug build". Long read, some conclusions at the end. https://aras-p.info/blog/2024/09/14/Vector-math-library-codegen-in-Debug/
Vector math library codegen in Debug · Aras' website

Aras' website
@aras heh, when spelunking disassembly recently i noticed we were globally enabling JMC on *release* builds, due to some ancient issue with library versioning. glad i found that before shipping :') msvc sure does have some fun curveballs.
@aras btw it's not mentioned in the blog, but one thing you can often do is enable force inlining on the hot functions, which can help a bit since for most compilers that applies on the no optimizations build as well.
@dotstdy can you actually do that on MSVC? How?
@aras @dotstdy AFAIK, you can't. Even __forceinline is a hint to the compiler, albeit a very strong one.
It will, however, honour that hint in almost all cases.
@molecularmusing @aras @dotstdy At least, with __forceinline, if it can't get inlined you get a warning. The doc lists the circumstances where this can happen, and they are mostly reasonable, I very rarely hit that warning.
@rjurga @aras @dotstdy Has somebody checked the executables for a list of all supported [[msvc:]] attributes?
Maybe they have one in there... (I found a few I did not know about by reading through their CRT sources).