>Probably it's the cost of OpenWatcom MT safe CRTL. Harbour does not use >extensively CRTL. In practice the only one function which may have >serious performance impact is memory allocation. Maybe I will be able to >say sth more if I see all speedtst results for Harbour compiled with and >without -bm flag and check which tests are slower.
Rebuilt without -bm flag ----------------------- [ total application time: ]....................................55.61 [ total real time: ]...........................................55.45 ----------------------- So -bm cause a very serious performance decrease Note: Previous (-bm) and this test were using hbrun ST Below are without and with -bm flag results, both ST With previous hbrun MT was: ----------------------- [ total application time: ]...................................198.42 [ total real time: ]..........................................197.09 ----------------------- David Macias Without -bm flag: 11/06/08 05:35:17 OS/2 4.50 Harbour 1.1.0dev (Rev. 9846) Open Watcom C++ 12.70.8 (32-bit) THREADS: 0 N_LOOPS: 1000000 [ T000: empty loop overhead ]...................................0.16 ==================================================================== [ T001: x := L_C ]..............................................0.13 [ T002: x := L_N ]..............................................0.10 [ T003: x := L_D ]..............................................0.13 [ T004: x := S_C ]..............................................0.10 [ T005: x := S_N ]..............................................0.13 [ T006: x := S_D ]..............................................0.10 [ T007: x := M_C ]..............................................0.16 [ T008: x := M_N ]..............................................0.13 [ T009: x := M_D ]..............................................0.13 [ T010: x := P_C ]..............................................0.13 [ T011: x := P_N ]..............................................0.16 [ T012: x := P_D ]..............................................0.13 [ T013: x := F_C ]..............................................0.26 [ T014: x := F_N ]..............................................0.42 [ T015: x := F_D ]..............................................0.29 [ T016: x := o:GenCode ]........................................0.39 [ T017: x := o[8] ].............................................0.29 [ T018: round( i / 1000, 2 ) ]..................................0.48 [ T019: str( i / 1000 ) ].......................................1.03 [ T020: val( s ) ]..............................................0.48 [ T021: val( a [ i % 16 + 1 ] ) ]...............................0.97 [ T022: dtos( d - i % 10000 ) ].................................1.00 [ T023: eval( { || i % 16 } ) ].................................0.90 [ T024: eval( bc := { || i % 16 } ) ]...........................0.45 [ T025: eval( { |x| x % 16 }, i ) ].............................0.81 [ T026: eval( bc := { |x| x % 16 }, i ) ].......................0.52 [ T027: eval( { |x| f1( x ) }, i ) ]............................1.00 [ T028: eval( bc := { |x| f1( x ) }, i ) ]......................0.71 [ T029: x := &( "f1(" + str(i) + ")" ) ]........................6.16 [ T030: bc := &( "{|x|f1(x)}" ); eval( bc, i ) ]................6.10 [ T031: x := valtype( x ) + valtype( i ) ].....................0.87 [ T032: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]..........1.65 [ T033: x := a[ i % 16 + 1 ] == s ].............................0.68 [ T034: x := a[ i % 16 + 1 ] = s ]..............................0.77 [ T035: x := a[ i % 16 + 1 ] >= s ].............................0.74 [ T036: x := a[ i % 16 + 1 ] <= s ].............................0.77 [ T037: x := a[ i % 16 + 1 ] < s ]..............................0.71 [ T038: x := a[ i % 16 + 1 ] > s ]..............................0.77 [ T039: ascan( a, i % 16 ) ]....................................0.65 [ T040: ascan( a, { |x| x == i % 16 } ) ].......................6.52 [ T041: if i%1000==0;a:={};end; aadd(a,{i,1,.T.,s,s2,a2,bc ]....2.87 [ T042: x := a ]................................................0.16 [ T043: x := {} ]...............................................0.29 [ T044: f0() ]..................................................0.23 [ T045: f1( i ) ]...............................................0.35 [ T046: f2( c[1...8] ) ]........................................0.29 [ T047: f2( c[1...40000] ) ]....................................0.32 [ T048: f2( @c[1...40000] ) ]...................................0.32 [ T049: f2( @c[1...40000] ), c2 := c ]..........................0.45 [ T050: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................0.87 [ T051: f2( a ) ]...............................................0.32 [ T052: x := f4() ].............................................1.03 [ T053: x := f5() ].............................................0.58 [ T054: f_prv( c ) ]............................................0.84 ==================================================================== [ total application time: ]....................................55.61 [ total real time: ]...........................................55.45 Tests with current Harbour - OS/2 - With OpenWatcom 1.7 (Rev. 9846): [E:\harbour810\harbour\tests]e:\harbour810\harbourow\bin\hbrun_st.exe speedtst.prg [ total application time: ]...................................104.00 [ total real time: ]..........................................103.51 Something changed in between with Harbour code and/or compilation :-( In compilation I added -bm Tests with first complete Harbour-OW build showed around 55 seconds, near gcc335, now show allmost double Przemek, any hint ? David Macias With -bm flag: 11/06/08 04:50:32 OS/2 4.50 Harbour 1.1.0dev (Rev. 9846) Open Watcom C++ 12.70.8 (32-bit) THREADS: 0 N_LOOPS: 1000000 [ T000: empty loop overhead ]...................................0.13 ==================================================================== [ T001: x := L_C ]..............................................0.16 [ T002: x := L_N ]..............................................0.16 [ T003: x := L_D ]..............................................0.13 [ T004: x := S_C ]..............................................0.16 [ T005: x := S_N ]..............................................0.13 [ T006: x := S_D ]..............................................0.13 [ T007: x := M_C ]..............................................0.19 [ T008: x := M_N ]..............................................0.16 [ T009: x := M_D ]..............................................0.16 [ T010: x := P_C ]..............................................0.16 [ T011: x := P_N ]..............................................0.16 [ T012: x := P_D ]..............................................0.16 [ T013: x := F_C ]..............................................1.45 [ T014: x := F_N ]..............................................0.42 [ T015: x := F_D ]..............................................0.29 [ T016: x := o:GenCode ]........................................0.42 [ T017: x := o[8] ].............................................0.32 [ T018: round( i / 1000, 2 ) ]..................................0.52 [ T019: str( i / 1000 ) ].......................................2.13 [ T020: val( s ) ]..............................................0.48 [ T021: val( a [ i % 16 + 1 ] ) ]...............................0.97 [ T022: dtos( d - i % 10000 ) ].................................2.19 [ T023: eval( { || i % 16 } ) ].................................4.00 [ T024: eval( bc := { || i % 16 } ) ]...........................0.52 [ T025: eval( { |x| x % 16 }, i ) ].............................2.90 [ T026: eval( bc := { |x| x % 16 }, i ) ].......................0.55 [ T027: eval( { |x| f1( x ) }, i ) ]............................3.13 [ T028: eval( bc := { |x| f1( x ) }, i ) ]......................0.74 [ T029: x := &( "f1(" + str(i) + ")" ) ].......................17.97 [ T030: bc := &( "{|x|f1(x)}" ); eval( bc, i ) ]...............20.87 [ T031: x := valtype( x ) + valtype( i ) ].....................2.03 [ T032: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]..........2.68 [ T033: x := a[ i % 16 + 1 ] == s ].............................0.71 [ T034: x := a[ i % 16 + 1 ] = s ]..............................0.74 [ T035: x := a[ i % 16 + 1 ] >= s ].............................0.74 [ T036: x := a[ i % 16 + 1 ] <= s ].............................0.74 [ T037: x := a[ i % 16 + 1 ] < s ]..............................0.74 [ T038: x := a[ i % 16 + 1 ] > s ]..............................0.74 [ T039: ascan( a, i % 16 ) ]....................................0.61 [ T040: ascan( a, { |x| x == i % 16 } ) ].......................9.26 [ T041: if i%1000==0;a:={};end; aadd(a,{i,1,.T.,s,s2,a2,bc ]....5.65 [ T042: x := a ]................................................0.19 [ T043: x := {} ]...............................................1.32 [ T044: f0() ]..................................................0.23 [ T045: f1( i ) ]...............................................0.39 [ T046: f2( c[1...8] ) ]........................................0.35 [ T047: f2( c[1...40000] ) ]....................................0.35 [ T048: f2( @c[1...40000] ) ]...................................0.32 [ T049: f2( @c[1...40000] ), c2 := c ]..........................0.48 [ T050: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................0.94 [ T051: f2( a ) ]...............................................0.39 [ T052: x := f4() ].............................................2.06 [ T053: x := f5() ].............................................1.65 [ T054: f_prv( c ) ]............................................1.94 ==================================================================== [ total application time: ]...................................104.00 [ total real time: ]..........................................103.51 _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour