Performance difference between tclsh.exe and wish.exe 
Author Message
 Performance difference between tclsh.exe and wish.exe

I'm experiencing a huge difference in performance (under windows) between:
- a stock ActiveState tclsh.exe (launched from the command line
(cmd.exe)) and
- a stock ActiveState wish.exe
(these are 8.4.12 releases)

 From the timing results below, you can see that the the difference
regards the initial loading of a package specifically, and not:
- subsequent loading attempts or
- other arbitrary commands like [expr {rand()}].

The difference amounts to a factor 9 or so !

Can others reproduce this difference?
Does anybody have an explanation for such huge a difference?

Thanks in advance for your help,

Erik Leunissen
==========

Timing results:

tclsh.exe
=========
% time {package require cmdline}
1338654 microseconds per iteration        <==
% time {package require cmdline}
49 microseconds per iteration
% time {expr {rand()}} 100
3.16 microseconds per iteration
%

wish.exe
========
% time {package require cmdline}
15153 microseconds per iteration                  <==
2 % time {package require cmdline}
52 microseconds per iteration
% time {expr {rand()}} 100
3.09 microseconds per iteration
%

--

e.          hccnet.   | respecting a character's position in a line.



Fri, 07 Nov 2008 19:44:28 GMT  
 Performance difference between tclsh.exe and wish.exe

Quote:

> tclsh.exe
> =========
> % time {package require cmdline}
> 1338654 microseconds per iteration        <==

> wish.exe
> ========
> % time {package require cmdline}
> 15153 microseconds per iteration                  <==

wish has already loaded the Tk package, so it has already
built a list of available packages.  tclsh has to compile
that list at the first [package] command.  You don't get
anything for free -- wish starts more slowly.

--



Fri, 07 Nov 2008 20:42:20 GMT  
 Performance difference between tclsh.exe and wish.exe

Quote:

> wish has already loaded the Tk package, so it has already
> built a list of available packages.  tclsh has to compile
> that list at the first [package] command.  You don't get
> anything for free -- wish starts more slowly.

Right, that explains it indeed.

Thanks,

Erik
--

e.          hccnet.   | respecting a character's position in a line.



Fri, 07 Nov 2008 23:10:35 GMT  
 Performance difference between tclsh.exe and wish.exe

Quote:


>> tclsh.exe
>> =========
>> % time {package require cmdline}
>> 1338654 microseconds per iteration        <==

>> wish.exe
>> ========
>> % time {package require cmdline}
>> 15153 microseconds per iteration                  <==

> wish has already loaded the Tk package, so it has already
> built a list of available packages.  tclsh has to compile
> that list at the first [package] command.  You don't get
> anything for free -- wish starts more slowly.

This is the right explanation, but not for the right package.  In fact,
Tk uses a couple of packages, but I think it's msgcat that is causing
the full search path (whereas Tk is a C-bound package already loaded in
wish, unlike tclsh).

Jeff



Sun, 09 Nov 2008 13:19:17 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Difference pythonw.exe / python.exe !

2. iso_wish.exe (Standalone wish exe for windows is online)

3. umlaut handling difference between tclsh and wish?!?

4. 32-Bit NMAKE.EXE, LINK.EXE, LIB.EXE, & RC.EXE

5. c5print.exe and c5printx.exe cannot run in the root directory of a network drive

6. cscn.exe and cvvt.exe

7. ABC Exe Called From Clarion Exe

8. Splitting a big .exe in a smale.exe and many ddl's in C4b

9. ntvdm.exe - Application Error when running C55EE.exe

10. close exe form another exe

11. need cw21lpex.exe or c4lpex.exe

12. Running one EXE from another EXE

 

 
Powered by phpBB® Forum Software