Re: Tcl faster than Perl/Python...but only with tricks...
- From: "Mark Janssen" <mpc.janssen@xxxxxxxxx>
- Date: 30 Dec 2006 05:46:27 -0800
I asked myself, what make Tcl so damn slow here. I commented out the
if...puts...-part what made the thing twice as fast (and useless of
course...). But that shows, that matching only took half of the time, which
surprised me. I thought, reading the file and running through the
while-loop should take nearly no time...
So my question is, why are [gets] and or [while] so slow, and is there a
change to improve that? For text processing these are two very central
commands...
Are you sure gets and while are slow? At least a part of the result the
time command is giving is spent in intialization of the Tcl
interpreter. A better way to test the performance of the Tcl code would
be to use the [time] command to determine the time.
In my experience starting Tcl can be relatively slow if you have for
instance a lot of packages installed.
Mark
.
- Follow-Ups:
- Re: Tcl faster than Perl/Python...but only with tricks...
- From: Stephan Kuhagen
- Re: Tcl faster than Perl/Python...but only with tricks...
- References:
- Tcl faster than Perl/Python...but only with tricks...
- From: Stephan Kuhagen
- Tcl faster than Perl/Python...but only with tricks...
- Prev by Date: Who uses peer text widgets?
- Next by Date: Re: Tcl faster than Perl/Python...but only with tricks...
- Previous by thread: Tcl faster than Perl/Python...but only with tricks...
- Next by thread: Re: Tcl faster than Perl/Python...but only with tricks...
- Index(es):
Relevant Pages
|