Cython Performance Optimizations#178
Conversation
|
LTO already gets enabled earlier in the cmakelists file if supported by the compiler, ( As for the cython side, I think it will break when using MSVC as it is now though would have to test to be sure. Not sure if it will pick up CXXFLAGS/CFLAGS from the environment similarly to cmake or if there is some conditional way to add flags only when using gcc/clang, but maybe it's better to just leave it off for now. |
That all sounds good, I'll make these changes.
Quickly searching this, it looks like there is a way to detect the compiler. I'll update this, and probably just omit the extra flags for MSVC. Someone who can test it / uses Windows can verify if any flags help or harm performance. |
|
@oyvindln I made the updates discussed above. Let me know if there's anything else that needs changing. |
Fixes
-1assignment to initial hsync location. This should be set to 0 when not yet filled in. This will fix a possible scenario where the estimated hsync drifts over time if there is a long span of time with no vblanking intervals.Performance
Various performance tweaks to the cython sync code. This should help a bit with performance, especially with computers with CPUs that have modern vector instructions.
-O3 -march=native -fltonogilwhere possibleBefore (current vhs_decode branch):
After (this branch):