Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 49708a7cb0f1ca1b9ad6f598d7a6ac73cdf6f39a
Ticket: 716b427f76f8f97a8d9a06043903c53bb2b592c2
Suboptimal bytecode for $a[unset a]
User & Date: avl42 on 2017-05-30 15:11:23
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    Two samples:
      proc foo {a} { upvar 1 $a b;unset a }
      proc foo {a} { upvar 1 $a[unset a] b }
    
    starting with commit fc9ed1e751180816384d569101950c1f8c4582ad (on dgp-string-cat) the the second one slows down noticeably.
    
    
    Unrelated to the particular commit (i.e already before it) apparently sub-optimal bytecode is generated:
        (##) unsetScalar 1 %v2      # var "a"
        (##) push1 1        # ""
        (##) strcat 2
    If that could be avoided, then performance of strcat would play less of a role.
    
  5. foundin changed to: "trunk (8.7)"
  6. is_private changed to: "0"
  7. login: "avl42"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "2287a4a5f84eadc47fdc912609f4f98319372d33"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "avl42"
  14. subsystem changed to: "47. Bytecode Compiler"
  15. title changed to: "performance regression for $a[unset a] pattern"
  16. type changed to: "Bug"