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

Matt DiMeo (mdimeo@brooktree.com)
28 Sep 1994 17:51:38 GMT

In article <1994Sep27.085636.23932@paramount.nikhefk.nikhef.nl>,
Jeffrey Templon <templon@paramount.nikhefk.nikhef.nl> wrote:
>I haven't yet read all 101 replies on this thread. I do want
>to make some comments from a more "user-oriented" standpoint;
>I mean, I will be making commments based solely on using
>this sort of language for "end-user" projects; you won't hear
>anything about O(1) vs. O(n) ...

The users will care about O(1) vs. O(n) as soon as they notice how long it
takes for tcl to build up a ten thousand element list.

tst.tcl------------------
set l ""
for { set i 0 } { $i < 10000 } { incr i } {
lvarpush l $i
}
-------------------------

tst.perl-----------------
for ($i = 0 ; $i < 10000 ; $i++) {
unshift(@f, $i) ;
}
-------------------------

{/home/mdimeo}% /bin/time /cad/bin/perl tst.perl
4.8 real 4.6 user 0.0 sys
{/home/mdimeo}% /bin/time tcl tst.tcl
^CCommand terminated abnormally.
334.2 real 326.7 user 0.2 sys

I control-C'd the tcl one, 'cause I got tired of waiting. You get the idea.
Lisp would have been fast, probably faster than perl.

-Matt