Skip to content

Commit 2d39f5b

Browse files
committed
Enable link-time optimization for MacVim CI builds
From local profiling, enabling LTO gives a small but measurable improvement to performance. One test that I did was to open a really large Markdown file with vim-markdown (which usually chokes at large files) installed, and measure how long that takes. With LTO turned on, usually it gives at least 6-10% performance boost, which seems significant enough to justify turning it on as we essentially get the improvement for free (I didn't see similar boosts in other benhcmarking I did though, so it depends). Slight caveat is that the binary size sees a small increase (presumably due to inlining) but it's not too much. It takes more time to build with this turned on though, so only do this in CI.
1 parent 6500a0c commit 2d39f5b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ci/config.mk.sed

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Werror/
22
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function/
33
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter/
4+
# Add link-time optimization for even better performance
5+
/^CFLAGS[[:blank:]]*=/s/$/ -flto/
6+
/^LDFLAGS[[:blank:]]*=/s/$/ -flto/

0 commit comments

Comments
 (0)