- Windows XPPro SP2
- OpenWatcom 1.7a
- Make GNU for Win32
- Current Harbour
Przemek:
OpenWatcom in Windows does not fail with multithread
hbrun_st.exe speedtst.prg
--------------------------
[ total application time: ]....................................67.08
[ total real time: ]...........................................67.34
hbrun_mt.exe speedtst.prg --exclude=mem --scale --thread=2
--------------------------
[ total application time: ]...................................104.42
[ total real time: ]..........................................107.14
mttest01.prg
------------
Harbour 1.1.0dev (Rev. 9854)
join: .T.
result: Hello World!!! Hello World!!! Hello World!!!
static var type: B
12345.678
12346.678
mttest02.prg
------------
Harbour 1.1.0dev (Rev. 9854)
Main start
Thread ID: 00a26498
Thread begin
Parameters: A B C
t
===================
MttMtMt
Thread QUIT
Thread ALWAYS section
MMMMMMM
===================
Main QUIT
Main ALWAYS section
I'm EXIT procedure
mttest03.prg
------------
Harbour 1.1.0dev (Rev. 9854)
Main start
Thread ID:
Thread begin
Parameters: A B C
t 00a26498
===================
MttMttMttMttMt
Main QUIT
Main ALWAYS section
I'm EXIT procedure
Thread ALWAYS section
mttest04.prg
------------
Harbour 1.1.0dev (Rev. 9854)
Main start
Starting threads: <1><2><3><4><5>
Wait 5 seconds or hit any key...
Waiting for threads...
Threads joined
Sum of thread local counters: 1634479
Protected item result.......: 1634479 OK
Unprotected item result.....: 1634479 *
* - can be different then local sum on real multi-CPU systems
End of main
mttest05.prg
------------
Harbour 1.1.0dev (Rev. 9854)
Starting threads: <1><2><3><4><5>
Waiting for threads...
Threads joined
Sum of results: 5000500
should be: 5000500 OK
mttest06.prg
------------
Harbour 1.1.0dev (Rev. 9854)
Starting threads: <1><2><3><4><5>
Waiting for threads...
Threads joined
Sum of results: 5000500
should be: 5000500 OK
mttest07.prg
------------
Harbour 1.1.0dev (Rev. 9854)
Main start
Starting threads: <1><2><3><4><5>
Sending jobs...
Sending terminate values...<1><2><3><4><5>
Collecting results...
Waiting for threads...
Threads joined
OK, final sum: 16698333.33
End of main
David Macias
hbrun_st.exe speedtst.prg
--------------------------
Warning !!! Memory statistic enabled.
11/08/08 02:02:11 Windows XP 5.1.2600 Service Pack 2
Harbour 1.1.0dev (Rev. 9854) 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.14
[ T003: x := L_D ]..............................................0.14
[ T004: x := S_C ]..............................................0.16
[ T005: x := S_N ]..............................................0.14
[ T006: x := S_D ]..............................................0.14
[ T007: x := M_C ]..............................................0.16
[ T008: x := M_N ]..............................................0.14
[ T009: x := M_D ]..............................................0.14
[ T010: x := P_C ]..............................................0.16
[ T011: x := P_N ]..............................................0.14
[ T012: x := P_D ]..............................................0.16
[ T013: x := F_C ]..............................................0.66
[ T014: x := F_N ]..............................................0.42
[ T015: x := F_D ]..............................................0.27
[ T016: x := o:GenCode ]........................................0.41
[ T017: x := o[8] ].............................................0.31
[ T018: round( i / 1000, 2 ) ]..................................0.48
[ T019: str( i / 1000 ) ].......................................1.38
[ T020: val( s ) ]..............................................0.44
[ T021: val( a [ i % 16 + 1 ] ) ]...............................0.88
[ T022: dtos( d - i % 10000 ) ].................................1.36
[ T023: eval( { || i % 16 } ) ].................................1.89
[ T024: eval( bc := { || i % 16 } ) ]...........................0.50
[ T025: eval( { |x| x % 16 }, i ) ].............................1.48
[ T026: eval( bc := { |x| x % 16 }, i ) ].......................0.55
[ T027: eval( { |x| f1( x ) }, i ) ]............................1.69
[ T028: eval( bc := { |x| f1( x ) }, i ) ]......................0.77
[ T029: x := &( "f1(" + str(i) + ")" ) ]........................8.66
[ T030: bc := &( "{|x|f1(x)}" ); eval( bc, i ) ]................9.94
[ T031: x := valtype( x ) + valtype( i ) ].....................1.34
[ T032: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]..........1.91
[ T033: x := a[ i % 16 + 1 ] == s ].............................0.70
[ T034: x := a[ i % 16 + 1 ] = s ]..............................0.73
[ T035: x := a[ i % 16 + 1 ] >= s ].............................0.70
[ T036: x := a[ i % 16 + 1 ] <= s ].............................0.72
[ T037: x := a[ i % 16 + 1 ] < s ]..............................0.73
[ T038: x := a[ i % 16 + 1 ] > s ]..............................0.73
[ T039: ascan( a, i % 16 ) ]....................................0.61
[ T040: ascan( a, { |x| x == i % 16 } ) ].......................6.69
[ T041: if i%1000==0;a:={};end; aadd(a,{i,1,.T.,s,s2,a2,bc ]....3.52
[ T042: x := a ]................................................0.17
[ T043: x := {} ]...............................................0.55
[ T044: f0() ]..................................................0.23
[ T045: f1( i ) ]...............................................0.38
[ T046: f2( c[1...8] ) ]........................................0.34
[ T047: f2( c[1...40000] ) ]....................................0.34
[ T048: f2( @c[1...40000] ) ]...................................0.33
[ T049: f2( @c[1...40000] ), c2 := c ]..........................0.47
[ T050: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................0.92
[ T051: f2( a ) ]...............................................0.34
[ T052: x := f4() ].............................................1.73
[ T053: x := f5() ].............................................1.13
[ T054: f_prv( c ) ]............................................1.16
====================================================================
[ total application time: ]....................................67.08
[ total real time: ]...........................................67.34
hbrun_mt.exe speedtst.prg --exclude=mem --scale --thread=2
--------------------------
Warning !!! Memory statistic enabled.
11/08/08 02:03:37 Windows XP 5.1.2600 Service Pack 2
Harbour 1.1.0dev (Rev. 9854) (MT)+ Open Watcom C++ 12.70.8 (32-bit)
THREADS: 2
N_LOOPS: 1000000
excluded tests: 029 030 023 025 027 040 041 043 052 053 019 022 031 032 054
1 th. 2 th.
factor
============================================================================
[ T001: x := L_C ]____________________________________ 0.70 0.70 -> 1.00
[ T002: x := L_N ]____________________________________ 0.63 0.64 -> 0.98
[ T003: x := L_D ]____________________________________ 0.64 0.70 -> 0.91
[ T004: x := S_C ]____________________________________ 0.70 0.67 -> 1.05
[ T005: x := S_N ]____________________________________ 0.69 0.63 -> 1.10
[ T006: x := S_D ]____________________________________ 0.63 0.61 -> 1.03
[ T007: x := M_C ]____________________________________ 0.67 0.67 -> 1.00
[ T008: x := M_N ]____________________________________ 0.61 0.66 -> 0.93
[ T009: x := M_D ]____________________________________ 0.63 0.61 -> 1.02
[ T010: x := P_C ]____________________________________ 0.66 0.73 -> 0.89
[ T011: x := P_N ]____________________________________ 0.64 0.61 -> 1.05
[ T012: x := P_D ]____________________________________ 1.33 0.64 -> 2.07
[ T013: x := F_C ]____________________________________ 2.25 2.30 -> 0.98
[ T014: x := F_N ]____________________________________ 1.30 1.28 -> 1.01
[ T015: x := F_D ]____________________________________ 1.00 0.92 -> 1.08
[ T016: x := o:GenCode ]______________________________ 1.38 1.38 -> 1.00
[ T017: x := o[8] ]___________________________________ 1.08 1.06 -> 1.02
[ T018: round( i / 1000, 2 ) ]________________________ 1.81 1.81 -> 1.00
[ T020: val( s ) ]____________________________________ 1.50 1.45 -> 1.03
[ T021: val( a [ i % 16 + 1 ] ) ]_____________________ 2.66 2.67 -> 0.99
[ T024: eval( bc := { || i % 16 } ) ]_________________ 1.78 1.77 -> 1.01
[ T026: eval( bc := { |x| x % 16 }, i ) ]_____________ 1.94 1.95 -> 0.99
[ T028: eval( bc := { |x| f1( x ) }, i ) ]____________ 2.34 2.27 -> 1.03
[ T033: x := a[ i % 16 + 1 ] == s ]___________________ 2.11 1.98 -> 1.06
[ T034: x := a[ i % 16 + 1 ] = s ]____________________ 2.08 2.13 -> 0.98
[ T035: x := a[ i % 16 + 1 ] >= s ]___________________ 2.19 2.11 -> 1.04
[ T036: x := a[ i % 16 + 1 ] <= s ]___________________ 2.22 2.13 -> 1.04
[ T037: x := a[ i % 16 + 1 ] < s ]____________________ 2.27 2.23 -> 1.01
[ T038: x := a[ i % 16 + 1 ] > s ]____________________ 2.11 2.08 -> 1.01
[ T039: ascan( a, i % 16 ) ]__________________________ 2.02 2.01 -> 1.00
[ T042: x := a ]______________________________________ 0.72 0.72 -> 1.00
[ T044: f0() ]________________________________________ 0.89 0.91 -> 0.98
[ T045: f1( i ) ]_____________________________________ 1.22 1.22 -> 1.00
[ T046: f2( c[1...8] ) ]______________________________ 1.19 1.16 -> 1.03
[ T047: f2( c[1...40000] ) ]__________________________ 1.16 1.17 -> 0.99
[ T048: f2( @c[1...40000] ) ]_________________________ 1.16 1.16 -> 1.00
[ T049: f2( @c[1...40000] ), c2 := c ]________________ 1.47 1.45 -> 1.01
[ T050: f3( a, a2, s, i, s2, bc, i, n, x ) ]__________ 2.56 2.59 -> 0.99
[ T051: f2( a ) ]_____________________________________ 1.19 1.19 -> 1.00
============================================================================
[ TOTAL ]_________________________________________ 54.08 52.97 -> 1.02
============================================================================
[ total application time: ]...................................104.42
[ total real time: ]..........................................107.14
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour