Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ec5ed05944d441b884d472d2906cc6990df00f08
Ticket: 3380073fffffffffffffffffffffffffffffffff
declining [expr] performance
User & Date: ferrieux on 2011-07-28 01:31:50
Changes

  1. icomment:
    OK, a bit of hard facts proving that this indeed orthogonal to the [times] overhead:
    Using
    
    proc time2 {s n} {
        proc _tmp {} [format {
    set n %d
    while {[incr n -1]>=0} {%s}
        } $n $s]
        return [time _tmp]
    }
    puts [time {distance 41.0 -81.0 42.0 -82.0} 100000]
    puts [time2 {distance 41.0 -81.0 42.0 -82.0} 100000]
    
    I get the following pairs:
    ===== 8.5:
    4.97726 microseconds per iteration
    491821 microseconds per iteration
    ===== 8.6:
    6.82854 microseconds per iteration
    663014 microseconds per iteration
    
    So, though the T_EOE effect is indeed a bit stronger on 8.6, the bulk of the slowdown is intrinsic.
    
    Second data point: disassembling shows exactly the same bytecodes.
    
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"