Página 1 de 1

Função aSort() refeita, agora mais veloz.

Enviado: 31 Jul 2015 14:37
por Itamar M. Lins Jr.
Ola!

Código: Selecionar todos

2015-07-31 16:01 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
  * src/vm/asort.c
    % added new code for ASort()
      Warning: new sorting algorithm is stable (does not change the
               order of equal items). It means is not strictly Cl*pper
               compatible and it can be seen some dummy ASort() tests
               in HBTEST results.
Parabéns ao Fernando Athayde!!!

Saudações,
Itamar M. Lins Jr.

Função aSort() refeita, agora mais veloz.

Enviado: 03 Ago 2015 20:14
por Itamar M. Lins Jr.
Será que melhorou ?

Código: Selecionar todos

function main()
   local i := hb_secondsCPU()
   ASort( AFill( Array( 50000 ), 0 ),,, {|x,y| x > y } )
   ? hb_secondsCPU() - i, "sec."
return nil

Before: 390.99 sec
After: 0.12 sec 
Saudações,
Itamar M. Lins Jr.