Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2df76c8ebd50659de4352c28149573eb97afc2fb
Ticket: 1692378fffffffffffffffffffffffffffffffff
TIP 280: performance impact
User & Date: martinlemburg on 2007-04-02 21:04:16
Changes

  1. icomment:
    Logged In: YES 
    user_id=802134
    Originator: NO
    
    Using the tclkit 8.5a4 (version taken from [info patchlevel]) I have no performance regression at all:
    
        % puts [time {p "a"} 100000] ;# matching case
        1.62821 microseconds per iteration
        % puts [time {p "x"} 100000] ;# non-matching case
        1.72318 microseconds per iteration
    
    I mostly use switch with its -exact option - mostly, because I seldom need switch with other matching mechanisms.
    Here the timing results using switch with -exact:
    
        % puts [time {p "a"} 100000] ;# matching case
        1.4099 microseconds per iteration
        % puts [time {p "x"} 100000] ;# non-matching case
        2.25362 microseconds per iteration
    
    Where as I don't understand the increased runtime consumption for a non matching case.
    
    
  2. login: "martinlemburg"
  3. mimetype: "text/plain"
  4. username: "martinlemburg"