lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



I've now finished (software never is..) the Integer patch for Lua 5.1 (rc).

Performance figures (running test/factorial.lua 1000 times in a loop):
The values are 'user' column of 'time' output.


** iMac PowerPC G4 700MHz/512 MB, OS X 10.4.4 **

Sat Jan 21 00:51:29 EET 2006 / Asko Kauppi

float: 		1.07 1.10 1.10 1.09 (1.0900 = 100%)	143 792 bytes
float+int:	1.11 1.08 1.08 1.08 (1.0875 =  99.8%)	147 920 bytes (+4128)
double:		1.14 1.12 1.11 1.11 (1.1200 = 102.8%)	143 780 bytes (-12)
double+int:	1.14 1.11 1.11 1.11 (1.1175 = 102.5%)	147 908 bytes (+4116)


** NSLU2 ARM 266MHz/32 MB, Linux unslung 2.4.22 **

Sat Jan 21 02:34:22 EET 2006 / Asko Kauppi

float: 		5.17 5.10 5.13 5.07 (5.1175 = 100%)	126 472 bytes
float+int:	3.34 3.39 3.40 3.38 (3.3775 =  66.0%)	129 892 bytes (+3420)
double:		5.78 5.82 5.82 5.86 (5.8200 = 113.7%)	127 224 bytes (+752)
double+int:	3.52 3.56 3.53 3.54 (3.5375 =  69.1%)	130 588 bytes (+4116)


The good news is:
  - it remains completely transparent to both Lua C API and scripts
- it does not degrade FPU performance (at least on PowerPC, x86 not tested)
  - it gives >30% speed boost on non-FPU platform (ARM)
    (or, comparing double vs. float+int, the boost is 42%)
  - it has moderate size effect, but not major (4k)

Now, I'd like to gain more testing results, meaning more hardware where the thing is run. Anything with basic *nix utilities shall be easy, maybe needing
some changes in a Makefile and that's it.

Also, real world testing would prove to be more valuable than some particular
test app (since they're always biased, and simple).

-asko