在 2025-02-06 22:23, Jacek Caban 写道:
FWIW, that's the approach we take in Wine for entire CRT modules (not just static parts like mingw- w64-crt's counterpart), and it works well. Most optimizations lost this way can be addressed by writing efficient C code from the start, avoiding the need to second-guess how the compiler will handle it. I'd be in favor of applying the same approach to mingw-w64.

I agree.

Maybe it's just me, but committing compiler-generated assembly to the tree feels like a sign that something isn't quite right...

As for this specific case, handwritten assembly is hardly any better than this 
generated stuff.


On 6.02.2025 15:09, LIU Hao wrote:
On the aspect of an optimizer, I agree that it makes sense to assume `sincos()` 
should not be slower than a combination of `sin()` and `cos()`. If it's not the 
case then it's our bug and should be fixed.

At the very least, the proposed implementation is slower. Calling sincos() adds function call overhead compared to directly calling sin() and cos() separately. The optimization is a net loss in its current form.

Yes that's true. Unfortunately, unless we would like to re-implement `sincos()`, there's hardly a solution. A direct call is cheap, though.


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to