On Tue, 18 Nov 2008 11:51:25 +0100
Miguel Angel Marchuet <[EMAIL PROTECTED]> wrote:

> running speedtst with, we are more near from harbour speed:
> 
> #  define malloc( n )         ( void * ) HeapAlloc( GetProcessHeap(), 0, ( n 
> ) )
> #  define realloc( p, n )     ( void * ) HeapReAlloc( GetProcessHeap(), 0, ( 
> void * ) ( p ), ( n ) )
> #  define free( p )           HeapFree( GetProcessHeap(), 0, ( void * ) ( p ) 
> )
> 
......
> s:=f4() ->                                           32.83
....
> ascan(a,{|x|x==i%ARR_LEN}) ->                         6.39
> ============================================================
> total application time:                              74.34
> total real time:                                     75.61
> 
> 
> with
> 
> #  define malloc( n )         ( void * ) LocalAlloc( LMEM_FIXED, ( n ) )
> #  define realloc( p, n )     ( void * ) LocalReAlloc( ( HLOCAL ) ( p ), ( n 
> ), LMEM_MOVEABLE )
> #  define free( p )           LocalFree( ( HLOCAL ) ( p ) )
> 
.....
> s:=f4() ->                                           59.84
....
> ============================================================
> total application time:                             101.69
> total real time:                                    103.66
> 
> and with harbour :
> 
.....
> s:=f4() ->                                           32.02
....
> ===========================================================
> total application time:                              63.86
> total real time:                                     65.33
> 

After all, the most significant speed difference based on the test
program is on : f4(), which return space(50000) which I don't think a
good programnmer will call it the way the test program does.

Personally, I'd prefer stability rather that speed of this kind :-)
--
Andi


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
xHarbour-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to