From: Dima Zinoviev
Subject: C/Lisp/Python/Tcl - yet another performance comparision
Date: 
Message-ID: <4dj9n1$49r@abel.cc.sunysb.edu>
Hi folks!

The following performance comparision of the more or less popular
interpreted languages (including C++ and GNU awk as reference points)
has been done using the code of Chris Trimble posted a few days ago to
some of these newsgroups (can be found at
http://vizlab.beckman.uiuc.edu/people/trimble/all_test_code.txt,
"system" feature has been omitted), and the original code for Lisp and
Tcl (let me know if you want it!). 


---------- The machine -------------

IBM PC
Pentium 100 MHz CPU
32M main memory
1G IDE HDD
Linux 1.2.13

---------- The languages -----------

The following languages have been tested: GNU C++ 2.6.3, GNU awk 2.15,
Xlisp 2.1g (both byte-compiled and plain), Python 1.2, Common Lisp 2.6
(both byte-compiled and plain) and Tcl 7.3.


---------- The tests ---------------

The following tests have been done:
ARRAY -- 1M array references
B.ARTH -- 4M base arithmetic operations (+-*/)
E.ARTH -- 4M advanced arithmetic operations (sqrt/sin)
FIO -- 200k file accesses
LOOP -- 3.2M nested loop iterations

---------- The results -------------
The upper number is the execution time, in seconds.
The lower number is the ratio of this number over the C++ performance
(the "badness" of the interpreter).

------------------------------------
		ARRAY	B.ARTH	E.ARTH	FIO	LOOP	OVERALL

g++		0.44	0.17	4.4	7.78	0.49	13.3
2.6.3		1	1	1	1	1	1

gawk		26	26	39	13	24	128
2.15		59	153	8.9	1.7	49	9.6

xlisp		29	11	54	33	20	147
2.1g cmp	66	65	12.3	4.2	41	11

Perl		23	28	38	27	37	153
4.0.1.8		52	165	8.6	3.5	76	11.5

xlisp		52	87	100	41	34	314
2.1g		118	512	22.7	5.3	69.4	23.6

Python		66	104	309	69	114	662
1.2		150	612	70.2	8.9	233	50

clisp		10.9	4.1	520	215	7.8	758
2.6 cmp		24.8	24.1	118.3	27.6	15.9	57

clisp		80.5	174	757	252	249	1,513
2.6		183	1,018	172	32.4	508	114

tcl		287	898	1,041	90.3	498	2,817
7.3		652	5,282	237	11.6	1,017	211.8

--------------------------
Cheers,
Dmitry

-- 
     Error 666: REALITY.SYS corrupted. Reboot Universe (Y/n)?   
-------------------------------------------------------------------------------
     Dmitry Zinoviev <http://pavel.physics.sunysb.edu>, at your service!