Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#770 closed issue (handled)

builds with sanitize+NDEBUG+unittests are painfully slow (esp. with gcc 7.x)

Reported by: westram Owned by: westram
Priority: minor Milestone:
Component: no idea Version: SVN
Keywords: Cc:

Description

Several modules compile incredibly slow with the above settings:

module buildtime buildmem
gb_aci.cxx 450s 6 Gb (1.3 Gb with 5.5)
insdel.cxx 350s
date.cxx 250s
arb_probe.cxx 170s
PT_buildtree.cxx 140s
ad_cb.cxx 140s
adquery.cxx 100s
Location.cxx 90s

(buildmem for other modules between 1-3 Gb, measured with gcc 7.2)

Functions were marked with comments by [16637]:

  • all affected functions are in unittest code!
  • eliminating these functions does also eliminate the problem

Build times for gcc6.3 are approx. 50-60% of 7.x times.

overall build time:

gcc affected+UT all-UT affected-UT
5.5 9m40s 5m20s 1m
6.3 9m30s 5m20s 1m
7.x 16m30s 6m10s 1m

(UT=unittests, rebuilded affected or all modules)


Problem is caused by optimization.

I tried to disable several optimizations on file- and function-basis using one/some/all of

-fno-var-tracking
-fno-var-tracking-assignments
-fno-gcse
-fno-tree-pta 
-fno-tree-pre
-fno-tree-vectorize
-fno-unit-at-a-time 
-fno-expensive-optimizations

Several did perform slightly better, while overall speed remained more or less the same.

I've also tried to split long test functions into several smaller ones - also no real gain.

Change History (2)

comment:1 Changed 7 years ago by westram

  • Status changed from new to _started

comment:2 Changed 7 years ago by westram

  • Resolution set to handled
  • Status changed from _started to closed

by [16649]

Changed optimization of several test functions:

  • disable var-tracking
  • optimize for size instead of speed
  • (some function only) disable GCSE
Last edited 7 years ago by westram (previous) (diff)
Note: See TracTickets for help on using tickets.