-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add -fno-var-tracking-assignments to pysairedis_wrap.cpp when built w…
…ith GCC This improves compilation time by a total of 16m by disabling the GCC feature "Variable Tracking Assingments." The trade-off for disabling this feature is reduced debuggability if anyone needs to go through the object file pysairedis_wrap.o with a debugger. Please see the background below for details. This was identified via the following issue in the SWIG project: - swig/swig#2384 (comment) This is a performance issue in GCC specifically, not CLANG. Results: On a server with the following specifications, the build time for libsairedis went from 20m23s down to 3m50s. CPU: Intel(R) Xeon(R) Gold 6430 RAM: 1Tb DDR5 OS: Ubuntu 22.04 g++: g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 On an Apple MacBook Pro (with a Debian build VM), the build time for libsairedis also dropped significantly from 17m43s down to 3m46s CPU: Apple M3 Pro RAM: 18Gb OS: Debian 12 Bookworm g++: g++ (Debian 12.2.0-14) 12.2.0 Background: - https://gcc.gnu.org/wiki/Var_Tracking_Assignments - https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/6/html/developer_guide/ch-debug-vta#ch-debug-vta Signed-off-by: Mike RE Mallin <[email protected]>
- Loading branch information
1 parent
8d0f5eb
commit e440f74
Showing
3 changed files
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters