Newsgroups: gnu.misc.discuss,comp.lang.tcl,comp.lang.scheme,comp.lang.python
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!news.duke.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!vixen.cso.uiuc.edu!uchinews!wimpy.cpe.uchicago.edu!kap1
From: kap1@wimpy.cpe.uchicago.edu (Dietrich J. Kappe)
Subject: Re: Tcl/Lisp/Python: A "User" point of view
In-Reply-To: pa@mrao.cam.ac.uk's message of 29 Sep 1994 17:58:04 GMT
Message-ID: <KAP1.94Sep29164416@wimpy.cpe.uchicago.edu>
Sender: news@uchinews.uchicago.edu (News System)
Organization: Center for Population Economics
References: <9409232314.AA29957@mole.gnu.ai.mit.edu>
	<SCHWARTZ.94Sep24164719@groucho.cse.psu.edu>
	<KFOGEL.94Sep24225539@ninja.life.uiuc.edu>
	<1994Sep27.085636.23932@paramount.nikhefk.nikhef.nl>
	<36cafa$5ue@btree.brooktree.com> <36ev7c$ies@lyra.csx.cam.ac.uk>
Date: Thu, 29 Sep 1994 22:44:16 GMT
Lines: 30
Xref: glinda.oz.cs.cmu.edu gnu.misc.discuss:18574 comp.lang.tcl:19667 comp.lang.scheme:10131 comp.lang.python:1796

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-
