On Mon, 28 Feb 2011 10:43:33 +0100
"Enrico Maria Giordano" <e.m.giord...@emagsoftware.it> wrote:

> Is DL malloc active by default or we have to set something to activate it?

DL malloc is not the default build flag. You need to activete it by
setting SET CLIBFLAGS=-DHB_FM_DL_ALLOC

I attached a benchmark test, where STD = default, DL = using DL malloc
which shows more than 30% speed improvement on MSVC10.

=======================================================================
02/28/11 17:34:24 Windows XP Professional 5.01.2600 Service Pack 3
xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 9329)
Microsoft Visual C++ 16.00.30319.01
THREADS: 0
N_LOOPS: 1000000
                                                                 DL   STD
                                                                ==========
[ T000: empty loop overhead ]...................................0.06  0.08
==================================================================== =====
[ T001: x := L_C ]..............................................0.06  0.05
[ T002: x := L_N ]..............................................0.03  0.03
[ T003: x := L_D ]..............................................0.05  0.02
[ T004: x := S_C ]..............................................0.05  0.06
[ T005: x := S_N ]..............................................0.05  0.06
[ T006: x := S_D ]..............................................0.05  0.03
[ T007: x := M->M_C ]...........................................0.06  0.05
[ T008: x := M->M_N ]...........................................0.05  0.03
[ T009: x := M->M_D ]...........................................0.05  0.03
[ T010: x := M->P_C ]...........................................0.06  0.03
[ T011: x := M->P_N ]...........................................0.05  0.02
[ T012: x := M->P_D ]...........................................0.05  0.02
[ T013: x := F_C ]..............................................0.27  0.70
[ T014: x := F_N ]..............................................0.30  0.25
[ T015: x := F_D ]..............................................0.17  0.16
[ T016: x := o:Args ]...........................................0.38  0.64
[ T017: x := o[2] ].............................................0.09  0.06
[ T018: round( i / 1000, 2 ) ]..................................0.41  0.67
[ T019: str( i / 1000 ) ].......................................0.98  2.03
[ T020: val( s ) ]..............................................0.47  0.69
[ T021: val( a [ i % 16 + 1 ] ) ]...............................0.73  0.94
[ T022: dtos( d - i % 10000 ) ].................................0.73  0.92
[ T023: eval( { || i % 16 } ) ].................................0.77  1.52
[ T024: eval( bc := { || i % 16 } ) ]...........................0.53  0.78
[ T025: eval( { |x| x % 16 }, i ) ].............................0.64  1.11
[ T026: eval( bc := { |x| x % 16 }, i ) ].......................0.50  0.75
[ T027: eval( { |x| f1( x ) }, i ) ]............................0.84  1.56
[ T028: eval( bc := { |x| f1( x ) }, i ) ]......................0.70  1.22
[ T029: eval( bc := &("{ |x| f1( x ) }"), i ) ].................0.66  1.16
[ T030: x := &( "f1(" + str(i) + ")" ) ]........................9.06 11.52
[ T031: bc := &( "{|x|f1(x)}" ), eval( bc, i ) ]...............10.41 12.33
[ T032: x := valtype( x ) +  valtype( i ) ].....................0.88  1.75
[ T033: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]..........1.17  1.98
[ T034: x := a[ i % 16 + 1 ] == s ].............................0.44  0.41
[ T035: x := a[ i % 16 + 1 ] = s ]..............................0.44  0.39
[ T036: x := a[ i % 16 + 1 ] >= s ].............................0.42  0.39
[ T037: x := a[ i % 16 + 1 ] <= s ].............................0.42  0.39
[ T038: x := a[ i % 16 + 1 ] < s ]..............................0.42  0.38
[ T039: x := a[ i % 16 + 1 ] > s ]..............................0.44  0.38
[ T040: ascan( a, i % 16 ) ]....................................0.56  0.83
[ T041: ascan( a, { |x| x == i % 16 } ) ].......................6.00  8.86
[ T042: iif( i%1000==0, a:={}, ) , aadd(a,{i,1,.T.,s,s2,a2 ]....1.25  3.28
[ T043: x := a ]................................................0.06  0.05
[ T044: x := {} ]...............................................0.22  0.42
[ T045: f0() ]..................................................0.23  0.47
[ T046: f1( i ) ]...............................................0.28  0.53
[ T047: f2( c[1...8] ) ]........................................0.27  0.55
[ T048: f2( c[1...40000] ) ]....................................0.28  0.53
[ T049: f2( @c[1...40000] ) ]...................................0.27  0.53
[ T050: f2( @c[1...40000] ), c2 := c ]..........................0.34  0.59
[ T051: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................0.55  0.80
[ T052: f2( a ) ]...............................................0.30  0.55
[ T053: x := f4() ].............................................1.58  3.00
[ T054: x := f5() ].............................................0.77  1.59
[ T055: x := space(16) ]........................................0.50  1.16
[ T056: f_prv( c ) ]............................................1.02  1.95
==================================================================== =====
[ total application time: ]....................................51.83 75.59
[ total real time: ]...........................................52.70 77.45
=======================================================================

Andi


------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to