Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: db8449028c8e8d52265be615f912d4e329042361
Ticket: 1990276fffffffffffffffffffffffffffffffff
Surprising differences in variable access speed.
User & Date: msofer on 2008-06-12 03:49:25
Changes

  1. closedate changed to: "2008-06-11T20:49:25"
  2. closer changed to: "msofer"
  3. icomment:
    Logged In: YES 
    user_id=148712
    Originator: NO
    
    This is a bug in the interpretation of the timing script: [t2] will reset $data to {} after the first run, so that the remaining 9 runs are done on empty data.
    
    Proper timing gives
    
    % proc t1 {} {variable data; binary encode hex $data}
    % proc t2 {} {variable data; binary encode hex -state data ""}
    % set data0 [binary format @102400]; string length $data0
    102400
    % time {set data $data0; t1} 10
    1032.5 microseconds per iteration
    % time {set data $data0; t2}
    1010 microseconds per iteration
    
    
    
  4. login: "msofer"
  5. mimetype: "text/plain"
  6. resolution changed to: "Rejected"
  7. status changed to: "Closed"
  8. username: "msofer"