Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0dea7d7485a347ef82b0d6e053d09b4a2d719bf7
Ticket: 1953758fffffffffffffffffffffffffffffffff
CONCAT1 of ByteArrays
User & Date: ferrieux on 2008-04-28 23:47:33
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    So far, the CONCAT1 instruction goes through the string reps of all objects, even when all are byte arrays. This compromises performance in heavy byte-juggling code since it means converting back and forth to UTF-8. This is odd since [string range] et al. do have an optimization for the byte array case.
    
    The attached patch (against 8.5.1) fixes that, by first looping through all to-be-concatenated objects to check whether they are all byte arrays (or empty strings).
    In that case, all operations are done at byte array level, while keeping the very same logic regarding in-place operation if possible (unshared first object).
    
    Moreover, the inclusion of the empty string case allows for the "K-free K" idiom $x[set x {}], which in the end allows the following in-place byte array growing operation:
    
          set x $x[set x {}]$y
    
    Test suite OK, and stepped through gdb to check most branches.
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "ferrieux"
  10. subsystem changed to: "12. ByteArray Object"
  11. title changed to: "CONCAT1 of ByteArrays"
  12. type changed to: "Patch"