[Patch] Optimisations to uComplex
Original Reporter info from Mantis: CuriousKit @CuriousKit
-
Reporter name: J. Gareth Moreton
Original Reporter info from Mantis: CuriousKit @CuriousKit
- Reporter name: J. Gareth Moreton
Description:
This patch aligns the "complex" data type to a 16-byte boundary on x86_64 systems and additionally declares all of the operators and subroutines as "vectorcall" so the compiler better utilises the XMM registers for an overall performance gain.
The type is not aligned on non-x86_64 systems (especially as some target platforms may have tight memory restrictions), and "vectorcall" should be silently ignored outside of x86_64-win64.
Steps to reproduce:
Apply patch, recompile packages and confirm correct functionality of uComplex unit.
Additional information:
Further improvements would be required to the compiler in order to better utilise the vector registers, but this is a good start and a source of motivation.
Some minor typos/language differences in the comments of uComplex were also corrected.
Mantis conversion info:
- Mantis ID: 36202
- OS: Microsoft Windows
- OS Build: 10 Professional
- Build: r43222
- Platform: All x86_64 platforms
- Version: 3.3.1
- Monitored by: » @avagames (George), » @MageSlayer (Denis Golovan), » @ccrause (Christo Crause)