Re: Tcl/Lisp/Python: A "User" point of view

Dietrich J. Kappe (kap1@wimpy.cpe.uchicago.edu)
Thu, 29 Sep 1994 22:44:16 GMT

In article <36ev7c$ies@lyra.csx.cam.ac.uk> pa@mrao.cam.ac.uk (Paul Alexander) writes:

Well using _standard_ tcl:

for { set i 0 } { $i < 10000 } { incr i } {
lappend l $i
}

(i.e. lappend not lvarpush)

I get:

PERL:
-----
/bin/time /usr/local/bin/perl lap.perl
6.4 real 6.1 user 0.1 sys

TCL:
----
/bin/time /soft/tcl/bin/tclsh lap.tcl
1.4 real 1.3 user 0.0 sys

I suggest substituting "push" for "unshift" in the perl code and running the
comparison again. Still, perl's not too shaby even if you prepend to a
list. I can't run the benchmark, as I don't have tcl on my system.

--
Dietrich "The man who squared the SPC" Kappe
kap1@wimpy.cpe.uchicago.edu
-finger for PGP public key-