This package contains executables and essential libraries compiled in cLang for use with Borland family compilers.
- Code: Select all Expand view RUN
- Test results:
tests/speedtst.prg
with this clang package and BCC73:
12/01/17 15:32:52 Windows 8 6.2.9200
xHarbour 1.2.3 Intl. (SimpLex) (Build 20170902) LLVM/Clang C 3.3.1 (35962.e6d55e0.777e1b8) (32-bit) ?
THREADS: 0
N_LOOPS: 1000000
[ T000: empty loop overhead ]...................................0.05
====================================================================
[ T001: x := L_C ]..............................................0.02
[ T002: x := L_N ]..............................................0.03
[ T003: x := L_D ]..............................................0.02
[ T004: x := S_C ]..............................................0.02
[ T005: x := S_N ]..............................................0.00
[ T006: x := S_D ]..............................................0.02
[ T007: x := M->M_C ]...........................................0.03
[ T008: x := M->M_N ]...........................................0.03
[ 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.02
[ T013: x := F_C ]..............................................0.13
[ T014: x := F_N ]..............................................0.23
[ T015: x := F_D ]..............................................0.05
[ T016: x := o:Args ]...........................................0.17
[ T017: x := o[2] ].............................................0.05
[ T018: round( i / 1000, 2 ) ]..................................0.20
[ T019: str( i / 1000 ) ].......................................0.55
[ T020: val( s ) ]..............................................0.27
[ T021: val( a [ i % 16 + 1 ] ) ]...............................0.34
[ T022: dtos( d - i % 10000 ) ].................................0.31
[ T023: eval( { || i % 16 } ) ].................................0.39
[ T024: eval( bc := { || i % 16 } ) ]...........................0.23
[ T025: eval( { |x| x % 16 }, i ) ].............................0.28
[ T026: eval( bc := { |x| x % 16 }, i ) ].......................0.23
[ T027: eval( { |x| f1( x ) }, i ) ]............................0.47
[ T028: eval( bc := { |x| f1( x ) }, i ) ]......................0.30
[ T029: eval( bc := &("{ |x| f1( x ) }"), i ) ].................0.34
[ T030: x := &( "f1(" + str(i) + ")" ) ]........................3.25
[ T031: bc := &( "{|x|f1(x)}" ), eval( bc, i ) ]................3.33
[ T032: x := valtype( x ) + valtype( i ) ].....................0.45
[ T033: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]..........0.59
[ T034: x := a[ i % 16 + 1 ] == s ].............................0.20
[ T035: x := a[ i % 16 + 1 ] = s ]..............................0.20
[ T036: x := a[ i % 16 + 1 ] >= s ].............................0.22
[ T037: x := a[ i % 16 + 1 ] <= s ].............................0.20
[ T038: x := a[ i % 16 + 1 ] < s ]..............................0.20
[ T039: x := a[ i % 16 + 1 ] > s ]..............................0.20
[ T040: ascan( a, i % 16 ) ]....................................0.41
[ T041: ascan( a, { |x| x == i % 16 } ) ].......................2.80
[ T042: iif( i%1000==0, a:={}, ) , aadd(a,{i,1,.T.,s,s2,a2 ]....0.67
[ T043: x := a ]................................................0.05
[ T044: x := {} ]...............................................0.08
[ T045: f0() ]..................................................0.08
[ T046: f1( i ) ]...............................................0.11
[ T047: f2( c[1...8] ) ]........................................0.16
[ T048: f2( c[1...40000] ) ]....................................0.14
[ T049: f2( @c[1...40000] ) ]...................................0.11
[ T050: f2( @c[1...40000] ), c2 := c ]..........................0.16
[ T051: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................0.31
[ T052: f2( a ) ]...............................................0.13
[ T053: x := f4() ].............................................0.61
[ T054: x := f5() ].............................................0.39
[ T055: x := space(16) ]........................................0.23
[ T056: f_prv( c ) ]............................................0.50
====================================================================
[ total application time: ]....................................23.23
[ total real time: ]...........................................24.06
with traditional C BCC73:
12/01/17 15:07:20 Windows 8 6.2.9200
xHarbour 1.2.3 Intl. (SimpLex) (Build 20170902) Borland/Embarcadero C++ 7.3 (32-bit) ?
THREADS: 0
N_LOOPS: 1000000
[ T000: empty loop overhead ]...................................0.06
====================================================================
[ T001: x := L_C ]..............................................0.05
[ T002: x := L_N ]..............................................0.05
[ T003: x := L_D ]..............................................0.05
[ T004: x := S_C ]..............................................0.06
[ T005: x := S_N ]..............................................0.05
[ T006: x := S_D ]..............................................0.03
[ T007: x := M->M_C ]...........................................0.05
[ T008: x := M->M_N ]...........................................0.05
[ T009: x := M->M_D ]...........................................0.05
[ T010: x := M->P_C ]...........................................0.05
[ T011: x := M->P_N ]...........................................0.05
[ T012: x := M->P_D ]...........................................0.05
[ T013: x := F_C ]..............................................0.17
[ T014: x := F_N ]..............................................0.28
[ T015: x := F_D ]..............................................0.11
[ T016: x := o:Args ]...........................................0.23
[ T017: x := o[2] ].............................................0.09
[ T018: round( i / 1000, 2 ) ]..................................0.27
[ T019: str( i / 1000 ) ].......................................0.98
[ T020: val( s ) ]..............................................0.34
[ T021: val( a [ i % 16 + 1 ] ) ]...............................0.47
[ T022: dtos( d - i % 10000 ) ].................................0.45
[ T023: eval( { || i % 16 } ) ].................................0.53
[ T024: eval( bc := { || i % 16 } ) ]...........................0.31
[ T025: eval( { |x| x % 16 }, i ) ].............................0.38
[ T026: eval( bc := { |x| x % 16 }, i ) ].......................0.30
[ T027: eval( { |x| f1( x ) }, i ) ]............................0.63
[ T028: eval( bc := { |x| f1( x ) }, i ) ]......................0.48
[ T029: eval( bc := &("{ |x| f1( x ) }"), i ) ].................0.47
[ T030: x := &( "f1(" + str(i) + ")" ) ]........................4.22
[ T031: bc := &( "{|x|f1(x)}" ), eval( bc, i ) ]................4.52
[ T032: x := valtype( x ) + valtype( i ) ].....................0.59
[ T033: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]..........0.86
[ T034: x := a[ i % 16 + 1 ] == s ].............................0.25
[ T035: x := a[ i % 16 + 1 ] = s ]..............................0.31
[ T036: x := a[ i % 16 + 1 ] >= s ].............................0.28
[ T037: x := a[ i % 16 + 1 ] <= s ].............................0.30
[ T038: x := a[ i % 16 + 1 ] < s ]..............................0.30
[ T039: x := a[ i % 16 + 1 ] > s ]..............................0.30
[ T040: ascan( a, i % 16 ) ]....................................0.39
[ T041: ascan( a, { |x| x == i % 16 } ) ].......................3.55
[ T042: iif( i%1000==0, a:={}, ) , aadd(a,{i,1,.T.,s,s2,a2 ]....0.88
[ T043: x := a ]................................................0.05
[ T044: x := {} ]...............................................0.14
[ T045: f0() ]..................................................0.13
[ T046: f1( i ) ]...............................................0.20
[ T047: f2( c[1...8] ) ]........................................0.17
[ T048: f2( c[1...40000] ) ]....................................0.16
[ T049: f2( @c[1...40000] ) ]...................................0.16
[ T050: f2( @c[1...40000] ), c2 := c ]..........................0.22
[ T051: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................0.48
[ T052: f2( a ) ]...............................................0.16
[ T053: x := f4() ].............................................0.72
[ T054: x := f5() ].............................................0.52
[ T055: x := space(16) ]........................................0.31
[ T056: f_prv( c ) ]............................................0.69
====================================================================
[ total application time: ]....................................31.41
[ total real time: ]...........................................32.92
So, more than 25% speed increase is gained. It's big enough, IMO :)
Use your traditional BCC73 to utilize this package, in other words, consider it as an alternative binary download.
--or--
if you wish to use Borland clang, you can download it here. It is free:
http://altd.embarcadero.com/download/bcppbuilder/BCC101.zip
download xharbour-clang:
http://www.mediafire.com/file/lfh1ly96zk7qwmk/xharbour-clang_win32_bcc73_20170902.7z