Przemek:

2010-03-25 00:14 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
 * harbour/src/vm/dlmalloc.c
   + updated to DLMALLOC 2.8.4
   * added OS2 support from our previous DLMALLOC version
   + updated to use our own recursive locks when available
   * disabled hack which breaks strict aliasing
   ! added some fixes to new DLMALLOC code
   TODO: Test it with MSVC win and wince builds and add _MSC_VER
         based protection for __forceinline usage (I do not know
         in which MSVC version it was added).
         Test it with OS2 GCC and OpenWatcom builds.
         Test it Darwin and some other *nixes.

Tested with:

- * $Id: ChangeLog 14234 2010-03-25 23:44:10Z druzus $
 2010-03-26 00:44 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
- OpenWatcom 1.8 for OS/2

on a computer with Core2Duo E8400 3 Ghz

Summary results for:
ST
==
 speedtst
[ total application time: ]....................................18.39
[ total real time: ]...........................................18.38

MT
==
 speedtst
[ total application time: ]....................................26.58
[ total real time: ]...........................................26.70

 speedtst --thread
[ total application time: ].....................................0.26
[ total real time: ]...........................................26.48

 speedtst --thread=2 --scale
[ total application time: ].....................................0.23
[ total real time: ]..........................................105.04


speedtst.txt content included below



Few hours later, same tests with older Harbour 14189:

ST
==
 speedtst
[ total application time: ]....................................18.61
[ total real time: ]...........................................18.67

MT
==
 speedtst
[ total application time: ]....................................26.87
[ total real time: ]...........................................26.85

 speedtst --thread
[ total application time: ].....................................0.26
[ total real time: ]...........................................26.79

 speedtst --thread=2 --scale
[ total application time: ].....................................0.16
[ total real time: ]..........................................107.76

David Macias


2010.03.25 19:49:23 OS/2 4.50
Harbour 2.1.0dev (Rev. 14234) Open Watcom C 12.80 (32-bit) x86
THREADS: 0
N_LOOPS: 1000000
[ T000: empty loop overhead ]...................................0.06
====================================================================
[ T001: x := L_C ]..............................................0.03
[ T002: x := L_N ]..............................................0.00
[ T003: x := L_D ]..............................................0.03
[ T004: x := S_C ]..............................................0.03
[ T005: x := S_N ]..............................................0.00
[ T006: x := S_D ]..............................................0.03
[ T007: x := M->M_C ]...........................................0.03
[ T008: x := M->M_N ]...........................................0.00
[ T009: x := M->M_D ]...........................................0.03
[ T010: x := M->P_C ]...........................................0.03
[ T011: x := M->P_N ]...........................................0.03
[ T012: x := M->P_D ]...........................................0.00
[ T013: x := F_C ]..............................................0.10
[ T014: x := F_N ]..............................................0.13
[ T015: x := F_D ]..............................................0.06
[ T016: x := o:Args ]...........................................0.10
[ T017: x := o[2] ].............................................0.10
[ T018: round( i / 1000, 2 ) ]..................................0.16
[ T019: str( i / 1000 ) ].......................................0.39
[ T020: val( s ) ]..............................................0.13
[ T021: val( a [ i % 16 + 1 ] ) ]...............................0.29
[ T022: dtos( d - i % 10000 ) ].................................0.29
[ T023: eval( { || i % 16 } ) ].................................0.23
[ T024: eval( bc := { || i % 16 } ) ]...........................0.13
[ T025: eval( { |x| x % 16 }, i ) ].............................0.23
[ T026: eval( bc := { |x| x % 16 }, i ) ].......................0.16
[ T027: eval( { |x| f1( x ) }, i ) ]............................0.32
[ T028: eval( bc := { |x| f1( x ) }, i ) ]......................0.23
[ T029: eval( bc := &("{ |x| f1( x ) }"), i ) ].................0.26
[ T030: x := &( "f1(" + str(i) + ")" ) ]........................1.74
[ T031: bc := &( "{|x|f1(x)}" ), eval( bc, i ) ]................2.23
[ T032: x := valtype( x ) +  valtype( i ) ].....................0.29
[ T033: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]..........0.52
[ T034: x := a[ i % 16 + 1 ] == s ].............................0.19
[ T035: x := a[ i % 16 + 1 ] = s ]..............................0.23
[ T036: x := a[ i % 16 + 1 ] >= s ].............................0.19
[ T037: x := a[ i % 16 + 1 ] <= s ].............................0.23
[ T038: x := a[ i % 16 + 1 ] < s ]..............................0.19
[ T039: x := a[ i % 16 + 1 ] > s ]..............................0.23
[ T040: ascan( a, i % 16 ) ]....................................0.19
[ T041: ascan( a, { |x| x == i % 16 } ) ].......................1.87
[ T042: iif( i%1000==0, a:={}, ) , aadd(a,{i,1,.T.,s,s2,a2 ]....0.65
[ T043: x := a ]................................................0.00
[ T044: x := {} ]...............................................0.03
[ T045: f0() ]..................................................0.03
[ T046: f1( i ) ]...............................................0.13
[ T047: f2( c[1...8] ) ]........................................0.10
[ T048: f2( c[1...40000] ) ]....................................0.10
[ T049: f2( @c[1...40000] ) ]...................................0.10
[ T050: f2( @c[1...40000] ), c2 := c ]..........................0.13
[ T051: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................0.39
[ T052: f2( a ) ]...............................................0.10
[ T053: x := f4() ].............................................0.65
[ T054: x := f5() ].............................................0.19
[ T055: x := space(16) ]........................................0.10
[ T056: f_prv( c ) ]............................................0.32
====================================================================
[ total application time: ]....................................18.39
[ total real time: ]...........................................18.38

2010.03.25 19:50:01 OS/2 4.50
Harbour 2.1.0dev (Rev. 14234) (MT) Open Watcom C 12.80 (32-bit) x86
THREADS: 0
N_LOOPS: 1000000
[ T000: empty loop overhead ]...................................0.03
====================================================================
[ T001: x := L_C ]..............................................0.10
[ T002: x := L_N ]..............................................0.10
[ T003: x := L_D ]..............................................0.10
[ T004: x := S_C ]..............................................0.06
[ T005: x := S_N ]..............................................0.06
[ T006: x := S_D ]..............................................0.10
[ T007: x := M->M_C ]...........................................0.10
[ T008: x := M->M_N ]...........................................0.06
[ T009: x := M->M_D ]...........................................0.10
[ T010: x := M->P_C ]...........................................0.13
[ T011: x := M->P_N ]...........................................0.06
[ T012: x := M->P_D ]...........................................0.10
[ T013: x := F_C ]..............................................0.23
[ T014: x := F_N ]..............................................0.16
[ T015: x := F_D ]..............................................0.10
[ T016: x := o:Args ]...........................................0.19
[ T017: x := o[2] ].............................................0.16
[ T018: round( i / 1000, 2 ) ]..................................0.29
[ T019: str( i / 1000 ) ].......................................0.55
[ T020: val( s ) ]..............................................0.26
[ T021: val( a [ i % 16 + 1 ] ) ]...............................0.42
[ T022: dtos( d - i % 10000 ) ].................................0.45
[ T023: eval( { || i % 16 } ) ].................................0.52
[ T024: eval( bc := { || i % 16 } ) ]...........................0.23
[ T025: eval( { |x| x % 16 }, i ) ].............................0.39
[ T026: eval( bc := { |x| x % 16 }, i ) ].......................0.26
[ T027: eval( { |x| f1( x ) }, i ) ]............................0.52
[ T028: eval( bc := { |x| f1( x ) }, i ) ]......................0.39
[ T029: eval( bc := &("{ |x| f1( x ) }"), i ) ].................0.39
[ T030: x := &( "f1(" + str(i) + ")" ) ]........................3.16
[ T031: bc := &( "{|x|f1(x)}" ), eval( bc, i ) ]................3.45
[ T032: x := valtype( x ) +  valtype( i ) ].....................0.48
[ T033: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]..........0.81
[ T034: x := a[ i % 16 + 1 ] == s ].............................0.35
[ T035: x := a[ i % 16 + 1 ] = s ]..............................0.39
[ T036: x := a[ i % 16 + 1 ] >= s ].............................0.35
[ T037: x := a[ i % 16 + 1 ] <= s ].............................0.35
[ T038: x := a[ i % 16 + 1 ] < s ]..............................0.39
[ T039: x := a[ i % 16 + 1 ] > s ]..............................0.35
[ T040: ascan( a, i % 16 ) ]....................................0.32
[ T041: ascan( a, { |x| x == i % 16 } ) ].......................2.52
[ T042: iif( i%1000==0, a:={}, ) , aadd(a,{i,1,.T.,s,s2,a2 ]....1.03
[ T043: x := a ]................................................0.10
[ T044: x := {} ]...............................................0.19
[ T045: f0() ]..................................................0.13
[ T046: f1( i ) ]...............................................0.16
[ T047: f2( c[1...8] ) ]........................................0.16
[ T048: f2( c[1...40000] ) ]....................................0.19
[ T049: f2( @c[1...40000] ) ]...................................0.13
[ T050: f2( @c[1...40000] ), c2 := c ]..........................0.19
[ T051: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................0.52
[ T052: f2( a ) ]...............................................0.19
[ T053: x := f4() ].............................................0.77
[ T054: x := f5() ].............................................0.35
[ T055: x := space(16) ]........................................0.26
[ T056: f_prv( c ) ]............................................0.58
====================================================================
[ total application time: ]....................................26.58
[ total real time: ]...........................................26.70

2010.03.25 19:50:39 OS/2 4.50
Harbour 2.1.0dev (Rev. 14234) (MT)+ Open Watcom C 12.80 (32-bit) x86
THREADS: all->56
N_LOOPS: 1000000
[ T000: empty loop overhead ]...................................0.03
====================================================================
[ T001: x := L_C ]..............................................0.23
[ T002: x := L_N ]..............................................0.10
[ T003: x := L_D ]..............................................0.00
[ T004: x := S_C ]..............................................0.16
[ T005: x := S_N ]..............................................0.16
[ T006: x := S_D ]..............................................0.10
[ T007: x := M->M_C ]...........................................0.00
[ T008: x := M->M_N ]...........................................0.06
[ T009: x := M->M_D ]...........................................0.03
[ T010: x := M->P_C ]...........................................0.00
[ T011: x := M->P_N ]...........................................0.10
[ T012: x := M->P_D ]...........................................0.00
[ T013: x := F_C ]..............................................0.71
[ T014: x := F_N ]..............................................0.68
[ T015: x := F_D ]..............................................0.65
[ T016: x := o:Args ]...........................................0.68
[ T017: x := o[2] ].............................................0.26
[ T018: round( i / 1000, 2 ) ]..................................0.19
[ T019: str( i / 1000 ) ].......................................1.58
[ T020: val( s ) ]..............................................0.16
[ T021: val( a [ i % 16 + 1 ] ) ]...............................1.77
[ T022: dtos( d - i % 10000 ) ].................................1.58
[ T023: eval( { || i % 16 } ) ].................................1.39
[ T024: eval( bc := { || i % 16 } ) ]...........................1.23
[ T025: eval( { |x| x % 16 }, i ) ].............................0.52
[ T026: eval( bc := { |x| x % 16 }, i ) ].......................0.94
[ T027: eval( { |x| f1( x ) }, i ) ]............................0.13
[ T028: eval( bc := { |x| f1( x ) }, i ) ]......................0.00
[ T029: eval( bc := &("{ |x| f1( x ) }"), i ) ].................0.00
[ T030: x := &( "f1(" + str(i) + ")" ) ]........................4.23
[ T031: bc := &( "{|x|f1(x)}" ), eval( bc, i ) ]................1.45
[ T032: x := valtype( x ) +  valtype( i ) ].....................0.00
[ T033: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]..........0.39
[ T034: x := a[ i % 16 + 1 ] == s ].............................0.55
[ T035: x := a[ i % 16 + 1 ] = s ]..............................0.52
[ T036: x := a[ i % 16 + 1 ] >= s ].............................0.00
[ T037: x := a[ i % 16 + 1 ] <= s ].............................0.00
[ T038: x := a[ i % 16 + 1 ] < s ]..............................0.00
[ T039: x := a[ i % 16 + 1 ] > s ]..............................0.23
[ T040: ascan( a, i % 16 ) ]....................................0.16
[ T041: ascan( a, { |x| x == i % 16 } ) ].......................2.94
[ T042: iif( i%1000==0, a:={}, ) , aadd(a,{i,1,.T.,s,s2,a2 ]....2.19
[ T043: x := a ]................................................0.35
[ T044: x := {} ]...............................................0.84
[ T045: f0() ]..................................................0.39
[ T046: f1( i ) ]...............................................0.42
[ T047: f2( c[1...8] ) ]........................................0.39
[ T048: f2( c[1...40000] ) ]....................................0.00
[ T049: f2( @c[1...40000] ) ]...................................0.00
[ T050: f2( @c[1...40000] ), c2 := c ]..........................0.48
[ T051: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................1.29
[ T052: f2( a ) ]...............................................0.77
[ T053: x := f4() ].............................................0.00
[ T054: x := f5() ].............................................0.94
[ T055: x := space(16) ]........................................0.77
[ T056: f_prv( c ) ]............................................0.00
====================================================================
[ total application time: ].....................................0.26
[ total real time: ]...........................................26.48

2010.03.25 19:51:14 OS/2 4.50
Harbour 2.1.0dev (Rev. 14234) (MT)+ Open Watcom C 12.80 (32-bit) x86
THREADS: 2
N_LOOPS: 1000000
                                                       1 th.  2 th.  factor
============================================================================
[ T001: x := L_C ]____________________________________  0.24   0.24 ->  1.00
[ T002: x := L_N ]____________________________________  0.22   0.23 ->  0.96
[ T003: x := L_D ]____________________________________  0.23   0.22 ->  1.05
[ T004: x := S_C ]____________________________________  0.22   0.23 ->  0.96
[ T005: x := S_N ]____________________________________  0.21   0.21 ->  1.00
[ T006: x := S_D ]____________________________________  0.22   0.21 ->  1.05
[ T007: x := M->M_C ]_________________________________  0.27   0.26 ->  1.04
[ T008: x := M->M_N ]_________________________________  0.21   0.21 ->  1.00
[ T009: x := M->M_D ]_________________________________  0.21   0.21 ->  1.00
[ T010: x := M->P_C ]_________________________________  0.24   0.23 ->  1.04
[ T011: x := M->P_N ]_________________________________  0.21   0.21 ->  1.00
[ T012: x := M->P_D ]_________________________________  0.20   0.22 ->  0.91
[ T013: x := F_C ]____________________________________  0.50   0.52 ->  0.96
[ T014: x := F_N ]____________________________________  0.44   0.44 ->  1.00
[ T015: x := F_D ]____________________________________  0.27   0.28 ->  0.96
[ T016: x := o:Args ]_________________________________  0.44   0.44 ->  1.00
[ T017: x := o[2] ]___________________________________  0.38   0.38 ->  1.00
[ T018: round( i / 1000, 2 ) ]________________________  0.57   0.56 ->  1.02
[ T019: str( i / 1000 ) ]_____________________________  1.16   1.15 ->  1.01
[ T020: val( s ) ]____________________________________  0.52   0.53 ->  0.98
[ T021: val( a [ i % 16 + 1 ] ) ]_____________________  0.90   0.90 ->  1.00
[ T022: dtos( d - i % 10000 ) ]_______________________  0.95   0.95 ->  1.00
[ T023: eval( { || i % 16 } ) ]_______________________  1.03   1.01 ->  1.02
[ T024: eval( bc := { || i % 16 } ) ]_________________  0.47   0.48 ->  0.98
[ T025: eval( { |x| x % 16 }, i ) ]___________________  0.79   0.80 ->  0.99
[ T026: eval( bc := { |x| x % 16 }, i ) ]_____________  0.55   0.55 ->  1.00
[ T027: eval( { |x| f1( x ) }, i ) ]__________________  1.02   1.07 ->  0.95
[ T028: eval( bc := { |x| f1( x ) }, i ) ]____________  0.81   0.80 ->  1.01
[ T029: eval( bc := &("{ |x| f1( x ) }"), i ) ]_______  0.74   0.76 ->  0.97
[ T030: x := &( "f1(" + str(i) + ")" ) ]______________  6.42   6.78 ->  0.95
[ T031: bc := &( "{|x|f1(x)}" ), eval( bc, i ) ]______  7.17   7.81 ->  0.92
[ T032: x := valtype( x ) +  valtype( i ) ]___________  1.10   1.07 ->  1.03
[ T033: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]  1.66   1.62 ->  1.02
[ T034: x := a[ i % 16 + 1 ] == s ]___________________  0.75   0.75 ->  1.00
[ T035: x := a[ i % 16 + 1 ] = s ]____________________  0.78   0.79 ->  0.99
[ T036: x := a[ i % 16 + 1 ] >= s ]___________________  0.78   0.79 ->  0.99
[ T037: x := a[ i % 16 + 1 ] <= s ]___________________  0.78   0.78 ->  1.00
[ T038: x := a[ i % 16 + 1 ] < s ]____________________  0.78   0.78 ->  1.00
[ T039: x := a[ i % 16 + 1 ] > s ]____________________  0.78   0.78 ->  1.00
[ T040: ascan( a, i % 16 ) ]__________________________  0.69   0.71 ->  0.97
[ T041: ascan( a, { |x| x == i % 16 } ) ]_____________  5.07   5.04 ->  1.01
[ T042: iif( i%1000==0, a:={}, ) , aadd(a,{i,1,.T.,s ]  2.11   2.12 ->  1.00
[ T043: x := a ]______________________________________  0.28   0.29 ->  0.97
[ T044: x := {} ]_____________________________________  0.50   0.50 ->  1.00
[ T045: f0() ]________________________________________  0.28   0.29 ->  0.97
[ T046: f1( i ) ]_____________________________________  0.42   0.43 ->  0.98
[ T047: f2( c[1...8] ) ]______________________________  0.43   0.43 ->  1.00
[ T048: f2( c[1...40000] ) ]__________________________  0.43   0.44 ->  0.98
[ T049: f2( @c[1...40000] ) ]_________________________  0.34   0.34 ->  1.00
[ T050: f2( @c[1...40000] ), c2 := c ]________________  0.47   0.46 ->  1.02
[ T051: f3( a, a2, s, i, s2, bc, i, n, x ) ]__________  1.06   1.07 ->  0.99
[ T052: f2( a ) ]_____________________________________  0.47   0.47 ->  1.00
[ T053: x := f4() ]___________________________________  1.65   1.65 ->  1.00
[ T054: x := f5() ]___________________________________  0.77   0.77 ->  1.00
[ T055: x := space(16) ]______________________________  0.51   0.52 ->  0.98
[ T056: f_prv( c ) ]__________________________________  1.18   1.16 ->  1.02
============================================================================
[   TOTAL   ]_________________________________________ 51.88  52.94 ->  0.98
============================================================================
[ total application time: ].....................................0.23
[ total real time: ]..........................................105.04


_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to