Angus Leeming <[EMAIL PROTECTED]> writes:

| $ size trial_case?
|    text    data     bss     dec     hex filename
|    7850     816       8    8674    21e2 trial_case1
|    9510     840      16   10366    287e trial_case2
|    9530     872       8   10410    28aa trial_case3

With gcc 3.4:

size trial_case? trial_case?.o
   text    data     bss     dec     hex filename
   5435     356     164    5955    1743 trial_case1
   6907     356     172    7435    1d0b trial_case2
   7120     356     168    7644    1ddc trial_case3
   2926       8       1    2935     b77 trial_case1.o
   4367       8      10    4385    1121 trial_case2.o
   4583       8       6    4597    11f5 trial_case3.o

I did some performance test as well, running the find_if 10000000
times for each of the cases.

         runtime  ratio     loops/sec
case 1:  5.070s   1.0       1972386
case 2:  7.965s   1.57      1255492
case 3: 11.341s   2.236      881756

I am not afraid of using any of these techniques in real code.

-- 
        Lgb

Reply via email to