Przemyslaw,
> You can also try
>    --thread=<n> --scale
> In such version each test is executed <n> times by one thread and then
> simultaneously once by <n> threads. It means that it exploits the worst
> possible cases in synchronization and scalability. It should also quite
> well test spinlocks on multi CPU machines.
> 
I've attached this test, with thread=2, this is on a PIV HT, so no real dual 
core.

> BTW have you tested the speed difference between _gettid() and _hb_gettid()
> in OS2 GCC builds? Or maybe GCC _gettid() makes exactly the same job as our
> _hb_gettid()?
> 
No speed test done, but I think there is only one way to have this info on
OS/2, that is, going through the Dos... API.

Best regards.

Maurilio.

-- 
 __________
|  |  | |__| Maurilio Longo
|_|_|_|____| farmaconsult s.r.l.


2010.03.25 13:07:35 OS/2 4.50
Harbour 2.1.0dev (Rev. 14225) (MT)+ EMX GNU C 3.3.5 (32-bit) x86
THREADS: 2
N_LOOPS: 1000000
                                                        1 th.  2 th.  factor
============================================================================
[ T001: x := L_C ]____________________________________  0.53   2.15 ->  0.25
[ T002: x := L_N ]____________________________________  0.39   1.80 ->  0.22
[ T003: x := L_D ]____________________________________  0.37   0.60 ->  0.62
[ T004: x := S_C ]____________________________________  0.50   0.61 ->  0.82
[ T005: x := S_N ]____________________________________  0.37   0.57 ->  0.65
[ T006: x := S_D ]____________________________________  0.36   0.57 ->  0.63
[ T007: x := M->M_C ]_________________________________  0.55   0.65 ->  0.85
[ T008: x := M->M_N ]_________________________________  0.43   2.26 ->  0.19
[ T009: x := M->M_D ]_________________________________  0.42   0.61 ->  0.68
[ T010: x := M->P_C ]_________________________________  0.49   0.63 ->  0.78
[ T011: x := M->P_N ]_________________________________  0.41   0.64 ->  0.65
[ T012: x := M->P_D ]_________________________________  0.42   0.64 ->  0.65
[ T013: x := F_C ]____________________________________  1.20   0.98 ->  1.23
[ T014: x := F_N ]____________________________________  0.95   0.77 ->  1.24
[ T015: x := F_D ]____________________________________  0.60   0.66 ->  0.91
[ T016: x := o:Args ]_________________________________  0.91   1.86 ->  0.49
[ T017: x := o[2] ]___________________________________  0.76   0.79 ->  0.97
[ T018: round( i / 1000, 2 ) ]________________________  1.20   1.26 ->  0.95
[ T019: str( i / 1000 ) ]_____________________________  6.25   4.37 ->  1.43
[ T020: val( s ) ]____________________________________  1.26   1.09 ->  1.16
[ T021: val( a [ i % 16 + 1 ] ) ]_____________________  2.22   1.97 ->  1.13
[ T022: dtos( d - i % 10000 ) ]_______________________  2.07   1.88 ->  1.10
[ T023: eval( { || i % 16 } ) ]_______________________  2.45   2.94 ->  0.83
[ T024: eval( bc := { || i % 16 } ) ]_________________  1.21   1.49 ->  0.82
[ T025: eval( { |x| x % 16 }, i ) ]___________________  1.76   2.57 ->  0.68
[ T026: eval( bc := { |x| x % 16 }, i ) ]_____________  1.26   1.52 ->  0.83
[ T027: eval( { |x| f1( x ) }, i ) ]__________________  1.94   2.30 ->  0.84
[ T028: eval( bc := { |x| f1( x ) }, i ) ]____________  1.40   1.90 ->  0.74
[ T029: eval( bc := &("{ |x| f1( x ) }"), i ) ]_______  1.41   1.78 ->  0.79
[ T030: x := &( "f1(" + str(i) + ")" ) ]______________ 16.38  13.05 ->  1.25
[ T031: bc := &( "{|x|f1(x)}" ), eval( bc, i ) ]______ 17.77  14.72 ->  1.21
[ T032: x := valtype( x ) +  valtype( i ) ]___________  2.09   2.44 ->  0.86
[ T033: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]  6.02   4.61 ->  1.30
[ T034: x := a[ i % 16 + 1 ] == s ]___________________  1.83   1.70 ->  1.07
[ T035: x := a[ i % 16 + 1 ] = s ]____________________  1.91   1.79 ->  1.07
[ T036: x := a[ i % 16 + 1 ] >= s ]___________________  1.91   1.76 ->  1.08
[ T037: x := a[ i % 16 + 1 ] <= s ]___________________  1.91   1.78 ->  1.08
[ T038: x := a[ i % 16 + 1 ] < s ]____________________  1.91   1.80 ->  1.06
[ T039: x := a[ i % 16 + 1 ] > s ]____________________  1.90   1.78 ->  1.07
[ T040: ascan( a, i % 16 ) ]__________________________  1.63   1.48 ->  1.10
[ T041: ascan( a, { |x| x == i % 16 } ) ]_____________ 11.64  11.32 ->  1.03
[ T042: iif( i%1000==0, a:={}, ) , aadd(a,{i,1,.T.,s ]  4.43   4.08 ->  1.09
[ T043: x := a ]______________________________________  0.56   0.69 ->  0.81
[ T044: x := {} ]_____________________________________  1.07   1.02 ->  1.05
[ T045: f0() ]________________________________________  0.53   0.88 ->  0.61
[ T046: f1( i ) ]_____________________________________  0.70   1.00 ->  0.71
[ T047: f2( c[1...8] ) ]______________________________  0.83   1.09 ->  0.76
[ T048: f2( c[1...40000] ) ]__________________________  0.83   1.09 ->  0.77
[ T049: f2( @c[1...40000] ) ]_________________________  0.68   1.09 ->  0.62
[ T050: f2( @c[1...40000] ), c2 := c ]________________  0.97   1.39 ->  0.70
[ T051: f3( a, a2, s, i, s2, bc, i, n, x ) ]__________  2.14   2.17 ->  0.99
[ T052: f2( a ) ]_____________________________________  0.86   1.10 ->  0.79
[ T053: x := f4() ]___________________________________  3.80   2.70 ->  1.41
[ T054: x := f5() ]___________________________________  1.46   1.46 ->  1.00
[ T055: x := space(16) ]______________________________  1.19   1.19 ->  1.00
[ T056: f_prv( c ) ]__________________________________  2.28   2.26 ->  1.01
============================================================================
[   TOTAL   ]_________________________________________123.30 123.27 ->  1.00
============================================================================
[ total application time: ].....................................1.55
[ total real time: ]..........................................246.57
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to