Przemyslaw Czerpak 20a5e7c24b 2009-08-12 00:15 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/xhb/xcstr.prg
    % fixed fatal for performance code used to serialize hash arrays
      in ValToPrg() functions. I know that xHarbour does not have native
      support for hash array iteration in FOR EACH statements so it's
      necessary to make some hacks but even there serialization can be
      quite easy done by simple FOR/NEXT loop and function calls to
      access given keys and values.
      Please remember that sending :keys or :values messages to hash
      arrays is very expensive in both languages because each time
      new array is created with copy of all key or values items.
      In the old code :values message was send inside a loop so to serialize
      hash array with 1000 items it was created 1000 arrays with 1000
      items inside each of them. It means 1000000 unnecessary item copy
      calls. Modern computers are very fast but such code can kill the
      performance on any hardware. It's also classic example when forcing
      FOR EACH usage in all places can give code thousands times slower
      then code using simple FOR/NEXT.
    % few minor optimizations
2009-08-11 22:16:01 +00:00
Description
Harbour Core — Reference source for Five development
172 MiB
Languages
C 80.3%
xBase 17.8%
Makefile 0.6%
C++ 0.4%
Harbour 0.4%
Other 0.3%