> The last nice source of ideas I found is Lua virtual machine. In Lua 5.0, VM > was rewritten from stack based machine to register-based machine. This > increased performance about 20%. Instead of: > PUSHLOCAL 1 > PUSHLOCAL 2 > ADD > POPLOCAL 3 > they use: > ADD 3 1 2
Sounds very good, I've been reading into this after reading your doc. Would be great to see such feat in Harbour VM. > Here is some old table with one more Lua column: > > No Test code Harbour PHP Python Ruby Java Java+JIT Lua > -----------------------------+------+------+------+------+-------+------+ > > Lua is very fast on numeric operations. A few differences to Harbour here > are: all numeric are double (no integers); no widths and decimals are stored > for numeric value. This saves some time for overflow check, integer <-> > double conversion, result format. Lua has only 35 instructions! In Lua all > arrays are assocciative arrays and they have a good performance for it also. > > http://www.tecgraf.puc-rio.br/~lhf/ftp/doc/jucs05.pdf > http://www.inf.puc-rio.br/~roberto/talks/lua-ll3.pdf Right on the second page, I see syntactic sugar: a.x for a[ "x" ], I'm not sure about the speed compared to a[ _NUM_INDEX ], but it surely gives something I was missing a few days ago. > I'm surprised a little. Our company is small but event our largest > application (has more than 100 browses and more than 100 dialogs, everything > in full GUI widgets) is about 2.5MB size (-gc2). That kind of application > should be to reach 10.8MB exe size?! :) Just did a quick count on this one app: more than 400 browses, about 1000 windows (including non-dialogs), it's a CUI app, about 13MB of .prg code. Anyway hbmk2 handles the process smoothly :) The other thing is that full -gc3 compile won't give any noticeable performance difference but lengthens the build process (C compile phase) significantly. The framework lib is compiled with -gc3 though. Brgds, Viktor _______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
