Tcl8.0 vs. Tcl8.4 in WinXP 
Author Message
 Tcl8.0 vs. Tcl8.4 in WinXP

Hi

I have tested my tcl-script with Tcl8.0 and Tcl8.4 in Windows NT
and it works very fine.

It seems that my script is many times faster (for example 24 sec vs. 157
sec)
with Tcl8.0 than Tcl8.4. That is why i would want to use Tcl8.0.

I would want to install my script and Tcl8.0 also in WinXP (professional),
but i can not find Tcl8.0 for WinXP.  Is there exist Tcl8.0 for WinXP ?

I seems that regular expressions takes this extra time ?

---
Esa



Sat, 29 Sep 2007 20:01:27 GMT  
 Tcl8.0 vs. Tcl8.4 in WinXP


Quote:

> > Hi

> > I have tested my tcl-script with Tcl8.0 and Tcl8.4 in Windows NT
> > and it works very fine.

> > It seems that my script is many times faster (for example 24 sec vs. 157
> > sec)
> > with Tcl8.0 than Tcl8.4. That is why i would want to use Tcl8.0.

> > I would want to install my script and Tcl8.0 also in WinXP
(professional),
> > but i can not find Tcl8.0 for WinXP.  Is there exist Tcl8.0 for WinXP ?

> > I seems that regular expressions takes this extra time ?
> Could be. The regular expression engine was totally renewed between 8.0
> and 8.1 and Unicode support was introduced.

> But a increase in this order of magnitude is probably not only due to
> regexp performance alone, but probably comes from many different sources.

> You should take a look at:
> http://wiki.tcl.tk/348

> and probably profile/time your code to see where so much time is wasted.
> To get a generall overview of the speed differences between 8.0 and 8.4
> take look at:
> http://wiki.tcl.tk/1611

> Mostly not in the magnitude you report, so there is probably something
> else going on.

> Michael

    Ok. There maybe other thinks than regexp also, but it would be easiest
    for me to install Tcl8.0 for WinXP, if it exists ?

---
Esa



Sat, 29 Sep 2007 20:57:06 GMT  
 Tcl8.0 vs. Tcl8.4 in WinXP
Quote:

> Hi

> I have tested my tcl-script with Tcl8.0 and Tcl8.4 in Windows NT
> and it works very fine.

> It seems that my script is many times faster (for example 24 sec vs. 157
> sec)
> with Tcl8.0 than Tcl8.4. That is why i would want to use Tcl8.0.

> I would want to install my script and Tcl8.0 also in WinXP (professional),
> but i can not find Tcl8.0 for WinXP.  Is there exist Tcl8.0 for WinXP ?

> I seems that regular expressions takes this extra time ?

Could be. The regular expression engine was totally renewed between 8.0
and 8.1 and Unicode support was introduced.

But a increase in this order of magnitude is probably not only due to
regexp performance alone, but probably comes from many different sources.

You should take a look at:
http://wiki.tcl.tk/348

and probably profile/time your code to see where so much time is wasted.
To get a generall overview of the speed differences between 8.0 and 8.4
take look at:
http://wiki.tcl.tk/1611

Mostly not in the magnitude you report, so there is probably something
else going on.

Michael



Sat, 29 Sep 2007 20:18:38 GMT  
 Tcl8.0 vs. Tcl8.4 in WinXP

Quote:

> Ok. There maybe other thinks than regexp also, but it would be easiest
> for me to install Tcl8.0 for WinXP, if it exists ?

There certainly aren't any builds of 8.0 explicitly for XP (8.0's been
out of the support cycle for longer than XP's been around!) but the
version for WinNT ought to work. I don't know if anyone's still got a
build with installer though; you might need to make your own from the
source code (which *is* available).

(Hmm, 24 to 157 seconds? That's pretty bad. I wonder (idly) why that
might be...)

Donal.



Sat, 29 Sep 2007 21:51:35 GMT  
 Tcl8.0 vs. Tcl8.4 in WinXP

Quote:
> Hi

> I have tested my tcl-script with Tcl8.0 and Tcl8.4 in Windows NT
> and it works very fine.

> It seems that my script is many times faster (for example 24 sec vs. 157
> sec)
> with Tcl8.0 than Tcl8.4. That is why i would want to use Tcl8.0.

> I would want to install my script and Tcl8.0 also in WinXP (professional),
> but i can not find Tcl8.0 for WinXP.  Is there exist Tcl8.0 for WinXP ?

> I seems that regular expressions takes this extra time ?

I suspect you have big opportunties to improve the RE's you're
using or perhaps use the newer "string map" command.

However there is a binary installer for 8.05.
Go to http://tcl.sourceforce.net
and click on the released files link for Tcl
I recommend 8.05. Get the .exe file.
There will be little error popups about
the 16bit subsystem - click ignore on
those and I believe it will all work.
Good luck.

Roy

BTW,
how big is the script? I'm sure folks
here on the NG would be curious as to
what code could make 8.4 that much
slower.

Quote:

> ---
> Esa



Sat, 29 Sep 2007 22:17:33 GMT  
 Tcl8.0 vs. Tcl8.4 in WinXP


Quote:

>> Ok. There maybe other thinks than regexp also, but it would be easiest
>> for me to install Tcl8.0 for WinXP, if it exists ?

>There certainly aren't any builds of 8.0 explicitly for XP (8.0's been
>out of the support cycle for longer than XP's been around!) but the
>version for WinNT ought to work. I don't know if anyone's still got a
>build with installer though; you might need to make your own from the
>source code (which *is* available).

>(Hmm, 24 to 157 seconds? That's pretty bad. I wonder (idly) why that
>might be...)

>Donal.

In a pinch, I might be able to pull 8.0 off one of my lab's
old WinNT boxes.


Sat, 29 Sep 2007 23:08:02 GMT  
 Tcl8.0 vs. Tcl8.4 in WinXP

Quote:

> BTW,
> how big is the script? I'm sure folks
> here on the NG would be curious as to
> what code could make 8.4 that much
> slower.

    The script is quite big (about 4000 code lines which includes also
comments)
    and complicated. The script read lot of data from separated logfiles
line by line
    (ASCII-text-format) and makes lot of results (writes to files) based of
logfiles.

    Typically in correct environment (full set of logfiles) the script can
take even 1,5 hours (in Tcl8.0).
    And if in that case Tcl8.4 is 6 times slower, it would take 9 hours.
This is a little too much !!
    The script is also run every day automically.

    From the very beginning the script was quite small, but little by little
the script has increased,
    because of new wanted features.

    But it works !!

---
Esa



Sun, 30 Sep 2007 18:33:24 GMT  
 Tcl8.0 vs. Tcl8.4 in WinXP

Quote:

> However there is a binary installer for 8.05.
> Go to http://tcl.sourceforce.net
> and click on the released files link for Tcl
> I recommend 8.05. Get the .exe file.
> There will be little error popups about
> the 16bit subsystem - click ignore on
> those and I believe it will all work.
> Good luck.

    It does not work. Installer can not continue after this error poppup.

    I tried by tcl8041.exe (my original) and tcl805.exe (from
http://www.tcl.tk/software/tcltk/8.0.html).

---
Esa



Sun, 30 Sep 2007 19:35:35 GMT  
 Tcl8.0 vs. Tcl8.4 in WinXP

Quote:

> It seems that regular expressions takes this extra time ?

Is that a guess or do you have a small example that you can try/[time], assuming
you manage to put your hands on tcl8.0.

Do you have many [expr] in the script?
I don't know how it was on 8.0, but  make sure to using curlies in (almost every
case of) [expr].

(i.e. [expr {$a + $b}] rather than [expr $a + $b].

When I found out about that, it really supprised me how much faster my script were!

--F

.



Sun, 30 Sep 2007 19:53:31 GMT  
 Tcl8.0 vs. Tcl8.4 in WinXP

Quote:

> > It seems that regular expressions takes this extra time ?

> Is that a guess or do you have a small example that you can try/[time],
assuming
> you manage to put your hands on tcl8.0.

    It is mainly guess and also is based on my experience from other
tcl-scripts i have done.
    I have not done yet strict timestamping. Only total performing time of
the script.

Quote:
> Do you have many [expr] in the script?
> I don't know how it was on 8.0, but  make sure to using curlies in (almost
every
> case of) [expr].

> (i.e. [expr {$a + $b}] rather than [expr $a + $b].

> When I found out about that, it really supprised me how much faster my
script were!

    I have about 100 [expr]:s in my script.
    I tried to using curlies in [expr]:s, but it seems not help anymore in
my case.

    Total performing times of the script are now: 24-29 sec (Tcl8.0) and
155-159 sec (Tcl8.4) still.

---
Esa



Sun, 30 Sep 2007 20:57:50 GMT  
 Tcl8.0 vs. Tcl8.4 in WinXP

Quote:


>>>It seems that regular expressions takes this extra time ?

>>Is that a guess or do you have a small example that you can try/[time],

> assuming

>>you manage to put your hands on tcl8.0.

>     It is mainly guess and also is based on my experience from other
> tcl-scripts i have done.
>     I have not done yet strict timestamping. Only total performing time of
> the script.

>>Do you have many [expr] in the script?
>>I don't know how it was on 8.0, but  make sure to using curlies in (almost

> every

>>case of) [expr].

>>(i.e. [expr {$a + $b}] rather than [expr $a + $b].

>>When I found out about that, it really supprised me how much faster my

> script were!

>     I have about 100 [expr]:s in my script.
>     I tried to using curlies in [expr]:s, but it seems not help anymore in
> my case.

>     Total performing times of the script are now: 24-29 sec (Tcl8.0) and
> 155-159 sec (Tcl8.4) still.

Is your code inside of procs? If not the bytecode compiler won't touch
it and it runs slow. put it inside procs to get the compiler benefits.

If you have lots of complex regexp action inside your script make sure
you save the compiling time by storing the regexp inside a variable. Do
not construct the regexp each time on the fly.

Michael



Sun, 30 Sep 2007 21:30:12 GMT  
 Tcl8.0 vs. Tcl8.4 in WinXP

Quote:

>>Do you have many [expr] in the script?
>>I don't know how it was on 8.0, but  make sure to using curlies in (almost

>     I have about 100 [expr]:s in my script.
>     I tried to using curlies in [expr]:s, but it seems not help anymore in
> my case.

>     Total performing times of the script are now: 24-29 sec (Tcl8.0) and
> 155-159 sec (Tcl8.4) still.

This is very surprising, which is why I'd like to see a bit
more of the script.  Unless all 100 exprs only ever run once
(none in loops), you should see some impact.  Also, the note
about using procs was correct as well.  The RE engine is
certainly slower post-8.0, where unicode and thread safety
was added.

--
   Jeff Hobbs, The Tcl Guy
   http://www.ActiveState.com/, a division of Sophos



Mon, 01 Oct 2007 01:00:38 GMT  
 Tcl8.0 vs. Tcl8.4 in WinXP
I ran a small test on two different Tcl versions:

On Tcl 8.0.3:
=========
%
% info patchlevel
8.0.3
%
% set longText "some reasonably not so short text to be used as a test"
some reasonably not so short text to be used as a test
%
% set shortText "short text"
short text
%
% for {set i 0} {$i < 10} {incr i} {append veryLong $longText}
% for {set i 0} {$i < 100} {incr i} {append extremelyLong $longText}
%
% time {regexp chr chr} 10000
11 microseconds per iteration
%
% time {regexp $shortText $shortText} 10000
19 microseconds per iteration
%
% time {regexp $longText $longText} 10000
19 microseconds per iteration
%
% time {regexp $veryLong $veryLong} 10000
33 microseconds per iteration
%
% time {regexp $extremelyLong $extremelyLong} 10000
128 microseconds per iteration
%

On Tcl 8.3.3:
=========
%
% info patchlevel
8.3.3
%
%  set longText "some reasonably not so short text to be used as a
test"
some reasonably not so short text to be used as a test
%
% set shortText "short text"
short text
%
% for {set i 0} {$i < 10} {incr i} {append veryLong $longText}
% for {set i 0} {$i < 100} {incr i} {append extremelyLong $longText}
%
% time {regexp chr chr} 10000
11 microseconds per iteration
%
% time {regexp $shortText $shortText} 10000
34 microseconds per iteration
%
% time {regexp $longText $longText} 10000
147 microseconds per iteration
%
% time {regexp $veryLong $veryLong} 1000
5761 microseconds per iteration
%
%  time {regexp $extremelyLong $extremelyLong} 10
711394 microseconds per iteration
%

Does this give a clue of the parts that potentially need optimizing?

Rgrds,
Khaled



Mon, 01 Oct 2007 01:59:24 GMT  
 Tcl8.0 vs. Tcl8.4 in WinXP

Quote:

> I ran a small test on two different Tcl versions:
> On Tcl 8.0.3:
...
> On Tcl 8.3.3:

...

Quote:
> Does this give a clue of the parts that potentially need optimizing?

Interesting stuff, but how do Tcl 8.4.9 and Tcl 8.5a2 compare?
Is there still a bug to be fixed?

--
| Don Porter          Mathematical and Computational Sciences Division |

| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|



Mon, 01 Oct 2007 02:53:14 GMT  
 Tcl8.0 vs. Tcl8.4 in WinXP

Quote:

> %  set longText "some reasonably not so short text to be used as a test"
> % for {set i 0} {$i < 100} {incr i} {append extremelyLong $longText}
> %  time {regexp $extremelyLong $extremelyLong} 10
> 711394 microseconds per iteration

More data:

% time {regexp $extremelyLong $extremelyLong} 10
3351675 microseconds per iteration
% time {regexp ^$extremelyLong$ $extremelyLong} 10
4260540 microseconds per iteration
% time "regexp ^$extremelyLong$ $extremelyLong" 10
1079 microseconds per iteration
% time "regexp $extremelyLong $extremelyLong" 10
1111 microseconds per iteration

Shimmering issues lurk.

--
| Don Porter          Mathematical and Computational Sciences Division |

| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|



Mon, 01 Oct 2007 05:10:21 GMT  
 
 [ 19 post ]  Go to page: [1] [2]

 Relevant Pages 

1. behaves differently in Tcl8.5 than in Tcl8.4

2. ANN: tcl8.4.2++.pdf, tcl8.4.2++.chm

3. Tnm 3.0.0 and tcl8.3 and tcl8.4

4. BUG: Tcl_AppendResult broken in tcl8.3.4 and tcl8.4

5. Difference between tcl8.0 and tcl8.3 entry widget

6. loading dll's in tcl8.2 and tcl8.3

7. BUG in tcl8.0.5 and tcl8.1 with variable scope

8. Tcl8.1b1 regexp's are now 17 times slower than in Tcl8.0.4

9. regexp in Tcl8.1 is 7 times slower then Tcl8.0 in this simple example

10. Tcl8.0p2, Tcl8.1a1: BUG+PATCH: lsort -dictionary compares signed chars

11. Exception from Itcl_GetContext() with tcl8.4 - with tcl8.3 it works. Bug in tcl8.4?

12. prodebug variable display vs. Tcl8.0: fixed

 

 
Powered by phpBB® Forum Software