dumping ground for random patches and texts
 help / color / mirror / Atom feed
* [PATCH] xap_helper_cxx: -O2 optimization for read-only files
@ 2024-02-07 21:26 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2024-02-07 21:26 UTC (permalink / raw)
  To: spew

This can save a few seconds on gigantic joins.
---
 lib/PublicInbox/XapHelperCxx.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/PublicInbox/XapHelperCxx.pm b/lib/PublicInbox/XapHelperCxx.pm
index 6bd165b8..eafe61a8 100644
--- a/lib/PublicInbox/XapHelperCxx.pm
+++ b/lib/PublicInbox/XapHelperCxx.pm
@@ -30,6 +30,7 @@ my $xflags = ($ENV{CXXFLAGS} // '-Wall -ggdb3 -pipe') . ' ' .
 	' -DXH_SPEC="'.join('',
 		map { s/=.*/:/; $_ } @PublicInbox::Search::XH_SPEC) . '" ' .
 	($ENV{LDFLAGS} // $ldflags);
+substr($xflags, 0, 0, '-O2 ') if !defined($ENV{CXXFLAGS}) && !-w __FILE__;
 my $xap_modversion;
 
 sub xap_cfg (@) {

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-07 21:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-07 21:26 [PATCH] xap_helper_cxx: -O2 optimization for read-only files Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).