strcat+strcat+strcat == baaad

David Laight david at l8s.co.uk
Mon Dec 2 06:57:12 CST 2002


> optimizations: -O2
     strcpy/cat   sprintf      snprintf     str_add      stpcpy
>    2.926220     1.427674     1.408928     3.405458     0.892890  1000
>    2.622081     1.308464     1.292384     3.062085     0.867009   900
>    2.363464     1.169335     1.152487     2.727685     0.740690   800

These do not look right, in particular the first column is too fast.
For instance my system gives (NUM_ITER=1000):

    0.174988     0.042060     0.042097     0.057267  1000
    0.155118     0.038678     0.038592     0.051500   900
    0.138036     0.034586     0.034597     0.045832   800
...
    0.005573     0.006449     0.006452     0.002103    30
    0.003858     0.005962     0.005964     0.001536    20
    0.002163     0.005783     0.005802     0.000967    10

It is as if the code from your program is executing far
slower than anything from libc!

	David

-- 
David Laight: david at l8s.co.uk



More information about the wine-devel mailing list