Re: Tcl faster than Perl/Python...but only with tricks...
- From: Stephan Kuhagen <stk@xxxxxxxxxx>
- Date: Sat, 30 Dec 2006 15:58:22 +0100
Hello
Uwe Klein wrote:
grep 0.430 for comparison: grep -i destroy bigfile
perl 0.365 your original
python 0.720 your original
tcl1 0.990 your original while ...
tcl2 0.750 same but while in proc
tcl3 0.500 same, but read and split into var, foreach line $var .....
tcl4 0.300 your regexp original
tcl5 0.330 your reg orig, but in proc ( no gain )
I tried also a solution with read and foreach. But that does have the same
drawback as mine with regexp, so it would not work for really big files.
Putting the while in a proc is a good solution, I should have done that
myself. But that is still far away from Perl. When I comment out the
if...puts-part again, it still needs 0.455s, so the [gets] and/or the
[while] still remain slow in a proc. This is, what surprises me.
Regards
Stephan
.
- References:
- Tcl faster than Perl/Python...but only with tricks...
- From: Stephan Kuhagen
- Re: Tcl faster than Perl/Python...but only with tricks...
- From: Uwe Klein
- Tcl faster than Perl/Python...but only with tricks...
- Prev by Date: Re: Tcl faster than Perl/Python...but only with tricks...
- Next by Date: Re: Who uses peer text widgets?
- Previous by thread: Re: 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
|