Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 15131affc9d5c6c6cf78c366a3c0f4200084f3c0
Ticket: 1692378fffffffffffffffffffffffffffffffff
TIP 280: performance impact
User & Date: nemethi on 2007-04-03 02:20:00
Changes

  1. icomment:
    Logged In: YES 
    user_id=317958
    Originator: YES
    
    Thanks to Andreas for his deep analysis.
    
    Just to make things clear:  I have *not* mixed up anything regarding Tcl 8.4.14.  I am using ActiveTcl8.4.14.0.272572-linux-ix86 (does this make a difference?).
    
    I have repeated the test, this time with the script sr.tcl.  Here are the results on my old Linux box:
    
    8.4.13
    p/match   4.91813 microseconds per iteration
    p/!match  5.41663 microseconds per iteration
    q/match   5.2057 microseconds per iteration
    q/!match  5.71473 microseconds per iteration
    
    8.4.14
    p/match   15.7745 microseconds per iteration
    p/!match  5.35078 microseconds per iteration
    q/match   15.97124 microseconds per iteration
    q/!match  5.52261 microseconds per iteration
    
    8.5a6
    p/match   19.0956 microseconds per iteration
    p/!match  5.49823 microseconds per iteration
    q/match   2.94506 microseconds per iteration
    q/!match  2.99353 microseconds per iteration
    
    It is good to know that the -exact option improves the performance when using Tcl 8.5.  It is, however, not very promising to see that w/o this option the switch command performs so much slower.  Just think of the many existing applications and libraries written w/o using the -exact option.  After all, that is the default!
    
    
  2. login: "nemethi"
  3. mimetype: "text/plain"
  4. username: "nemethi"