Re: Tcl faster than Perl/Python...but only with tricks...
- From: Ian Bell <ruffrecords@xxxxxxxxxxx>
- Date: Sat, 30 Dec 2006 23:20:56 +0000
Uwe Klein wrote:
Stephan Kuhagen wrote:
Alexandre Ferrieux wrote:
A simple way of removing all the "first time" overheads (interpreter
init, bytecode compilation) would be to do the comparison on a file ten
times larger (just cat it over and over again).
Good point. I made the file 100 times larger now, so they do not fit into
memory and no in-memory-processing has an advantage (which destroys my
first and fastest solution with reading the whole file and the using
regexpt to that large string). I used the fastest Tcl version mentioned
here until now (Uwe Klein: while and gets in a proc).
Just for the fun of it:
I changed the [gets $fd line] to [set line [read $fd 65536]].
the difference is negligible.
uwe
I am no expert but presumably, not matter what the language, the gets or
read ends up as an fgets C library call. Is it possible the differences are
due in part to the way each language sets up the channel e.g buffer size,
blocking, no chars read in fgets etc?
Ian
.
- Follow-Ups:
- Re: Tcl faster than Perl/Python...but only with tricks...
- From: Donal K. Fellows
- 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
- Re: Tcl faster than Perl/Python...but only with tricks...
- From: George Petasis
- Re: Tcl faster than Perl/Python...but only with tricks...
- From: Stephan Kuhagen
- Re: Tcl faster than Perl/Python...but only with tricks...
- From: Alexandre Ferrieux
- Re: 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: Tcl faster than Perl/Python...but only with tricks...
- 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):