Re: [RFA 2/4] dwarf2_physname

André Pönitz
2009-11-25T09:16:54Z

On Tuesday 24 November 2009 23:54:06 Tom Tromey wrote:
> >>>>> "André" == André Pönitz <andre.poenitz@nokia.com> writes:
>
> André> I guess it's hard to come up with a benchmark that everybody
> André> would consider authoritive. I could run a few tests for scenarios
> André> I am interested in, though. Am I right in assuming that I could just
> André> pull one of the archer archer-keiths-* branches? Would that be
> André> archer-keiths-linkage_name-redux?
>
> You want archer-keiths-expr-cumulative, that has these patches, but also
> some other C++ expression fixes.

Thanks.

Now the results of a highly unscientific approach at measuring "time"

# Attach to a running instance of Qt Creator using
# time $1 -batch -pid $creatorpid -ex 'set confirm off' -ex q

# gdb 6.8 from Ubuntu 9.04 (optimized build)
real 0m9.508s user 0m8.653s sys 0m0.852s
real 0m9.607s user 0m8.585s sys 0m0.860s
real 0m9.726s user 0m8.677s sys 0m0.912s
real 0m9.747s user 0m8.697s sys 0m0.824s

# archer-tromey-python (debug version)
real 0m10.474s user 0m9.933s sys 0m0.520s
real 0m10.600s user 0m9.889s sys 0m0.472s
real 0m10.621s user 0m9.977s sys 0m0.484s
real 0m10.894s user 0m10.197s sys 0m0.544s

# archer-keiths-expr-cumulative (debug version)
real 0m11.410s user 0m10.741s sys 0m0.608s
real 0m11.431s user 0m10.781s sys 0m0.636s
real 0m11.519s user 0m10.865s sys 0m0.544s
real 0m11.540s user 0m10.809s sys 0m0.508s

# archer-tromey-optional-psymtab (debug version)
real 0m8.687s user 0m7.772s sys 0m0.904s
real 0m8.687s user 0m7.816s sys 0m0.852s
real 0m8.823s user 0m7.828s sys 0m0.932s
real 0m9.050s user 0m7.936s sys 0m0.916s

# Attach to small program using QtCore and QtGui and run 'info types'
# time $1 -batch -pid $creatorpid -ex 'set confirm off' -ex 'set pagination off' -ex 'info types' -ex q

# gdb 6.8 from Ubuntu 9.04 (optimized build)
real 0m6.564s user 0m1.984s sys 0m0.252s
real 0m6.625s user 0m2.016s sys 0m0.256s
real 0m6.797s user 0m2.108s sys 0m0.268s

# archer-tromey-python (debug version)
real 0m5.180s user 0m1.784s sys 0m0.220s
real 0m5.237s user 0m1.832s sys 0m0.168s
real 0m5.165s user 0m1.764s sys 0m0.196s
real 0m5.187s user 0m1.832s sys 0m0.136s

# archer-keiths-expr-cumulative (debug version)
real 0m8.594s user 0m5.180s sys 0m0.264s
real 0m8.631s user 0m5.140s sys 0m0.252s
real 0m8.641s user 0m5.164s sys 0m0.272s
real 0m8.738s user 0m5.084s sys 0m0.320s

# archer-tromey-optional-psymtab (debug version)
real 0m5.085s user 0m1.592s sys 0m0.236s
real 0m5.101s user 0m1.592s sys 0m0.188s
real 0m5.091s user 0m1.656s sys 0m0.204s
real 0m5.080s user 0m1.552s sys 0m0.236s

Each scenario was run five times, I dropped the worst result from each,
so this is basically 'warm cache'.

I understand that I should have better used optimized builds
(I can re-do the test if needed) but I guess the picture is clear.

Looking at the 'user' colums:

Block 'attach':

expr-cumulativ loses ~10% against tromey-python (which is,
as I understand, unrelated to 'type stuff'). optional-psymtab
on the other hand shows a nice ~20% improvement.

Block 'ptype':

expr-cumulativ loses ~280% (!) against tromey-python, whereas
optional-psymtab gains >~10%

If someone feels like I should use other build options or use other
commands for the timing, please say so.

Andre'

PS: I could not sensibly run 'info ptype' in the gdb attached to the
Qt Creator as gdb was taking more than 1.8 GB and I have only 2 GB
on my desktop.