[vector] #20: Optimization strategy unclear (-Odph / -O2)

vector vector at projects.haskell.org
Tue May 18 14:26:36 EDT 2010


#20: Optimization strategy unclear (-Odph / -O2)
----------------------------------------+-----------------------------------
Reporter:  choener                      |        Owner:     
    Type:  defect                       |       Status:  new
Priority:  minor                        |    Milestone:  0.7
 Version:  0.6                          |   Resolution:     
Keywords:  documentation, optimization  |  
----------------------------------------+-----------------------------------
Changes (by Khudyakov):

 * cc: alexey.skladnoy at gmail.com (added)

Comment:

 From experience -Odph results in poor perfomance and failsafe choice is
 -O2.

 Here is benchmark results for functions from ticket #18. GHC 6.12 was
 used. G column is for functions which use foldl from Data.Vector.Generic.
 G' use strict foldl. Us are the same but use foldls from
 Data.Vector.Unboxed.

 All values are in ms.

 {{{
 Comp. flag  |   G      G'   |   U    U'   |
 ------------|---------------|-------------|
             | 190     44    | 190   46    |
 -O2         |   1.08   1.08 |  47.7  6.53 |
 -O2 -fn.m.s |   1.09   1.08 | 178   41.1  |
 -Odph       | 126     35    | 177   41.0  |
 }}}
 Perfomance of code compiled with -Odph is comparable with unoptimized
 code. And -fno-method-sharing flag only makes thing worse instead of
 improving them as was suggested in #18.

-- 
Ticket URL: <http://trac.haskell.org/vector/ticket/20#comment:3>
vector <http://trac.haskell.org/vector>
Package vector


More information about the vector mailing list