Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7fb7eeb30a47f70e8d953acb2a0ee9989c0be8be
Ticket: 3302370fffffffffffffffffffffffffffffffff
Performance gap between [global] and [::]
User & Date: msofer on 2011-05-25 05:36:27
Changes

  1. icomment:
    This CAN be solved easily enough: when the compiler detects a FQN, it can create a same-named (with qualifiers!) variable in the LVT that is auto-upvared to the global on proc entry. The body then always refers to the one in the LVT.
    
    The same thing could actually be done for [eval] and [uplevel] bodies, even for non qualified names. But in that case it probably requires other changes elsewhere: the whole core assumes that only proc (and lambda, and oo) bodies have an LVT, this assumption could be hidden somewhere unexpected.
    
    Another solution would be to code a fast-path for FQN variables in TEBC, reading the Tcl_Obj intrep. Currently only LVT variables have a fast inlined path, the others call the functions in tclVar.c
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"