
On 07/05/2010, at 19:53, Simon Marlow wrote:
On 05/05/2010 12:24, Roman Leshchinskiy wrote:
Whenever I do cabal sdist on one of my projects, I get this warning:
Distribution quality warnings: 'ghc-options: -O2' is rarely needed. Check that it is giving a real benefit and not just imposing longer compile times on your users.
This finally got me curious and I did a nofib run to compare -O to -O2. The results are below (this is with the current HEAD).
What were the compile-time results?
Gosh, I thought I included those. -1 s.d. ----- +1.1% +1 s.d. ----- +16.3% Average ----- +8.4% The full results are below. IMO, the increases are rather negligible. Roman Compile Times ------------------------------------------------------------------------------- Program log-O log-O2 ------------------------------------------------------------------------------- anna AbsConc3 0.23 +17.4% AbstractEval2 0.08 0.08 AbstractMisc 0.11 0.12 AbstractVals2 0.23 +17.4% Apply 0.10 0.12 BarakiConc3 0.17 0.18 BarakiMeet 0.11 0.12 BaseDefs 0.87 +8.0% Constructors 0.17 0.21 Dependancy 0.24 +25.0% DomainExpr 0.12 0.13 EtaAbstract 0.12 0.13 FrontierDATAFN2 0.19 0.19 FrontierGENERIC 0.16 0.16 FrontierMisc2 0.10 0.11 Inverse 0.16 0.16 LambdaLift5 0.42 +4.8% Main 0.31 +0.0% MakeDomains 0.10 0.10 Monster 0.12 0.12 MyUtils 0.13 0.13 Parser2 0.64 +7.8% PrettyPrint 0.13 0.13 PrintResults 0.23 +8.7% ReadTable 0.16 0.17 Simplify 0.10 0.10 SmallerLattice 0.36 +13.9% StrictAn6 0.59 +11.9% SuccsAndPreds2 0.24 +4.2% TExpr2DExpr 0.10 0.10 TypeCheck5 0.70 +14.3% Utils 0.34 +14.7% ansi Main 0.20 0.20 atom Main 0.16 0.16 awards Main 0.16 0.16 QSort 0.04 0.05 banner Main 0.29 +3.4% bernouilli Main 0.15 0.15 boyer Main 0.42 +4.8% boyer2 Checker 0.06 0.07 Lisplikefns 0.15 0.16 Main 0.08 0.08 Rewritefns 0.07 0.09 Rulebasetext 0.11 0.12 bspt BSPT 0.20 0.23 Euclid 0.32 +3.1% EuclidGMS 0.15 0.16 GeomNum 0.11 0.11 Init 0.13 0.13 Input 0.40 +5.0% Interface 0.10 0.10 Interpret 0.12 0.13 Libfuns 0.03 0.03 MGRlib 0.09 0.09 Main 0.06 0.06 Merge 0.13 0.14 Params 0.09 0.09 Prog 0.06 0.06 Rationals 0.18 0.19 Render 0.12 0.12 Stdlib 0.09 0.10 cacheprof Arch_x86 0.68 +2.9% Generics 0.19 0.20 Main 2.13 +11.3% calendar Main 0.24 +8.3% cichelli Auxil 0.15 0.17 Interval 0.03 0.03 Key 0.04 0.04 Main 0.05 0.05 Prog 0.12 0.12 circsim Main 0.63 +7.9% clausify Main 0.23 +4.3% comp_lab_zift Main 0.68 +20.6% compress BinConv 0.09 0.09 BinTest 0.08 0.08 Decode 0.16 0.16 Defaults 0.05 0.05 Encode 0.14 0.16 Main 0.06 0.06 PTTrees 0.04 0.04 Uncompress 0.07 0.07 compress2 Encode 0.14 0.39 Main 0.08 0.08 WriteRoutines 0.10 0.12 constraints Main 0.34 +8.8% cryptarithm1 Main 0.09 0.09 cryptarithm2 Main 0.22 +13.6% MonadState 0.10 0.10 MonadTrans 0.03 0.03 cse Main 0.25 +4.0% StateMonad 0.07 0.07 eliza Main 0.39 +2.6% event Main 0.30 +10.0% exp3_8 Main 0.15 0.15 expert Knowledge 0.11 0.11 Main 0.15 0.15 Match 0.06 0.07 Result 0.04 0.04 Search 0.09 0.10 Table 0.14 0.17 fem Assemble_loadve 0.07 0.07 Assemble_stiffn 0.10 0.12 Basics 0.06 0.06 DB_interface 0.14 0.15 Database 0.13 0.14 Degrees 0.17 0.19 Displacement 0.09 0.09 Elemforce 0.07 0.07 Elemstif 0.09 0.10 Main 0.06 0.06 Matrix 0.18 0.20 Pre_assemble 0.08 0.08 PrintSource 0.19 0.19 Printuvwforce 0.09 0.09 VBlldecomp 0.15 0.17 VBmatrix 0.16 0.17 Vector 0.13 0.15 fft Main 0.45 +13.3% fft2 Complex_Vectors 0.08 0.08 Fourier 0.18 0.20 Main 0.13 0.13 fibheaps Main 0.35 +8.6% fish Main 0.37 +2.7% fluid Asb_routs 0.10 0.10 C_matrix 0.16 0.16 Chl_decomp 0.18 0.24 Chl_method 0.20 0.22 Chl_routs 0.37 +51.4% Defs 0.03 0.03 Elefac 0.07 0.08 Input_proc 0.28 +32.1% Jcb_method 0.16 0.17 L_matrix 0.07 0.08 Main 0.08 0.09 Min_degree 0.12 0.14 Norm 0.07 0.07 Rhs_Asb_routs 0.16 0.17 S_Array 0.50 +18.0% S_matrix 0.15 0.15 TG_iter 0.22 +0.0% Tol_cal 0.06 0.07 fulsom Csg 0.29 +3.4% Interval 0.30 +6.7% Kolor 0.17 0.17 Main 0.11 0.11 Matrix 0.17 0.18 Oct 0.11 0.11 Patchlevel 0.03 0.03 Quad 0.10 0.11 Raster 0.13 0.13 Shapes 0.07 0.08 Types 0.19 0.21 Vector 0.08 0.08 gamteb Compton 0.11 0.11 Consts 0.05 0.05 Distance 0.10 0.13 GamtebMain 0.07 0.07 GamtebType 0.03 0.03 InitTable 0.14 0.15 Main 0.07 0.07 Output 0.15 0.16 Pair 0.08 0.08 PhotoElec 0.06 0.06 RoulSplit 0.06 0.06 TransPort 0.12 0.12 Utils 0.15 0.20 gcd Main 0.13 0.14 gen_regexps Main 0.13 0.13 genfft Main 0.40 +5.0% gg Activity 0.17 0.19 GRIP 0.33 +0.0% Graph 0.40 +12.5% Main 0.21 +0.0% PSlib 0.23 +0.0% Parse 0.10 0.10 Pool 0.13 0.14 Spark 0.15 0.16 StdLib 0.11 0.12 grep Main 0.29 +10.3% Parsers 0.09 0.09 StringMatch 0.25 +4.0% hidden Comparing 0.12 0.14 Cross 0.08 0.08 EdgePlate 0.06 0.06 Geometric 0.11 0.11 Hide 0.11 0.13 Main 0.07 0.07 Matrices 0.03 0.03 Memo 0.39 +7.7% MyIO 0.09 0.09 Numbers 0.13 0.13 Postscript 0.07 0.07 Preds 0.08 0.08 Rotate 0.06 0.06 Solve 0.08 0.08 Vectors 0.14 0.14 hpg Config 0.07 0.07 Env 0.17 0.17 GenExp 0.25 +4.0% GenType 0.11 0.11 GenVal 0.11 0.11 Main 0.26 +3.8% Types 0.32 +9.4% Utils 0.07 0.07 ida Main 0.39 +23.1% infer Environment 0.12 0.12 FiniteMap 0.08 0.08 Infer 0.09 0.10 InferMonad 0.11 0.11 Main 0.11 0.11 MaybeM 0.04 0.04 MyList 0.04 0.04 Parse 0.15 0.15 Shows 0.05 0.05 State 0.04 0.04 StateX 0.05 0.05 Substitution 0.08 0.08 Term 0.17 0.18 Type 0.17 0.18 integer Main 0.15 0.15 integrate Main 0.15 0.15 knights ChessSetArray 0.24 +8.3% ChessSetList 0.17 0.19 KnightHeuristic 0.12 0.18 Main 0.15 0.15 Queue 0.06 0.06 Sort 0.10 0.10 lcss Main 0.16 0.16 life Main 0.14 0.15 lift LambdaLift 0.38 +10.5% Main 0.07 0.07 Print 0.19 0.20 Test 0.08 0.08 Utilities 0.12 0.13 listcompr Main 0.33 +3.0% listcopy Main 0.33 +3.0% maillist Main 0.17 0.20 mandel Main 0.12 0.12 Mandel 0.12 0.12 PortablePixmap 0.06 0.06 mandel2 Main 0.19 0.22 minimax Board 0.16 0.17 Game 0.10 0.10 Main 0.05 0.05 Prog 0.04 0.04 Tree 0.07 0.07 Wins 0.04 0.04 mkhprog Main 0.35 +2.9% multiplier Main 0.51 +3.9% nucleic2 Main 0.60 +1.7% RA 0.44 +4.5% RC 0.43 +4.7% RG 0.18 0.18 RU 0.46 +4.3% Types 0.03 0.03 para Main 0.66 +24.2% paraffins Main 0.28 +17.9% parser Main 1.75 +15.4% parstof Main 2.80 +6.8% pic ChargeDensity 0.08 0.08 Consts 0.04 0.04 ElecField 0.13 0.15 Main 0.07 0.07 Pic 0.10 0.10 PicType 0.03 0.03 Potential 0.15 0.16 PushParticle 0.12 0.13 Utils 0.29 +10.3% power Main 0.46 +10.9% pretty CharSeq 0.06 0.08 Main 0.07 0.07 Pretty 0.15 0.17 primes Main 0.11 0.12 primetest IntLib 0.09 0.09 Main 0.07 0.08 MyRandom 0.06 0.06 Prime 0.12 0.15 prolog Engine 0.06 0.08 Interact 0.07 0.08 Main 0.18 0.18 Parse 0.09 0.10 PrologData 0.22 +4.5% Subst 0.08 0.08 Version 0.03 0.03 puzzle Main 0.30 +10.0% queens Main 0.11 0.12 reptile Auxprogfuns 0.28 +7.1% Diff 0.06 0.06 Drawfuns 0.10 0.10 Geomfuns 0.14 0.14 Help 0.11 0.11 Interstate 0.03 0.03 Layout 0.31 +6.5% Main 0.07 0.08 Mgrfuns 0.10 0.10 Progfuns 0.46 +4.3% Psfuns 0.09 0.09 Rational 0.09 0.10 Tilefuns 0.15 0.16 rewrite Main 0.61 +4.9% rfib Main 0.10 0.10 rsa Main 0.09 0.09 Rsa 0.12 0.12 scc Digraph 0.05 0.05 Main 0.07 0.07 sched Main 0.37 +8.1% scs LinearAlgebra 0.60 +35.0% Main 0.17 0.18 Parse 0.29 +3.4% ParseLib 0.14 0.15 RandomFix 0.10 0.11 Simulate 0.54 +16.7% Types 0.09 0.09 simple Main 3.46 +11.3% solid Main 1.89 +0.5% sorting Main 0.08 0.08 Sort 0.16 0.18 sphere Main 0.69 +14.5% symalg Ast 0.03 0.03 BasicNumber 0.27 +0.0% BasicNumberAppr 0.13 0.14 Env 0.05 0.05 Eval 0.13 0.14 Lexer 0.10 0.10 Main 0.10 0.10 Op 0.07 0.08 Parser 0.14 0.19 Print 0.12 0.12 RealM 0.20 0.20 tak Main 0.10 0.10 transform Main 1.58 +11.4% treejoin Main 0.17 0.19 typecheck Main 0.51 +7.8% veritas Attributes 0.05 0.05 Auto 0.07 0.07 Build_Tm 0.16 0.16 Build_itrm 0.23 +0.0% Core_database 0.54 +11.1% Core_datatype 0.12 0.12 Dcore 0.09 0.09 DerivedRules 0.14 0.16 Display 0.30 -3.3% Editor 0.09 0.09 Edlib 0.12 0.12 Getops 0.07 0.07 Globals 0.05 0.05 Goals 0.27 +11.1% Kernel 0.70 +1.4% Lookup 0.03 0.03 Main 0.29 +3.4% Parse 0.91 +16.5% Sub_Core1 0.24 +4.2% Sub_Core2 0.19 0.20 Sub_Core3 0.18 0.19 Sub_Core4 0.25 +4.0% Tacticals 0.10 0.10 Tactics 0.19 0.20 Tags 0.07 0.07 ThmTactics 0.66 +6.1% Token 0.15 0.17 Tree 0.17 0.18 Type_defs 0.07 0.07 Unparse 0.32 +9.4% Vtslib 0.06 0.06 X_interface 0.41 +4.9% wang Main 0.34 +5.9% wave4main Main 0.51 +0.0% wheel-sieve1 Main 0.16 0.18 wheel-sieve2 Main 0.16 0.18 x2n1 Main 0.12 0.13 -1 s.d. ----- +1.1% +1 s.d. ----- +16.3% Average ----- +8.4%