Skip to content
Tcl Source Code History Of Ticket dfccbeb623afe3f6
Login

History Of Ticket dfccbeb623afe3f6

Artifacts Associated With Ticket dfccbeb623afe3f6

  1. Ticket change [72c2569c71] (rid 139304) by anonymous on 2014-08-19 16:09:26:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      The following snippet of code takes about 30 seconds in Tcl 8.6, but runs in well under a second in Tcl 8.5. The problem is something to do with the upvar, and with the fact that "lappend" appends two elements at once -- if you replace the call with two "lappend"s of one element each, it runs fast.
      =============================
      proc ArrayGetSorted {arrayPtr} {
          set result {}
          upvar 1 $arrayPtr arrayName
          set nameList [array names arrayName]
          puts "Start [clock seconds]"
          foreach name $nameList {
              lappend result $name $arrayName($name)
          }
          puts "Done [clock seconds]"
          return $result
      }
      
      for {set n 0} {$n < 40000} {incr n} {
          set arr([list top [expr rand()] [expr rand()]]) data
      }
      ArrayGetSorted arr
      =============================
      
    5. foundin initialized to: "8.6"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "21e680c66afc6863cbbaf0aa5b26c9e8a4429339"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "17. Commands I-L"
    15. title initialized to: "lappend very slow in tcl 8.6"
    16. type initialized to: "Bug"
  2. Ticket change [9f17bc27a5] (rid 139305) by aku on 2014-08-19 16:52:15:

    1. assignee changed to: "dkf"
    2. icomment:
      The lappend issue is a duplicate of a bug which got recently fixed.
      
      Hm. ... There is [1332fc7df2]; which is still open.
      
      Found it, the issue was [b43f2b49f7]. The fix for that should be in the 8.5.16 release candidates, so you should be able to test if that fixes your issue.
      
      Assigning to dkf to say more.
      
    3. login: "aku"
    4. mimetype: "text/plain"
    5. severity changed to: "Severe"
  3. Ticket change [82b909898e] (rid 139306) by aku on 2014-08-19 16:54:01:

    1. icomment:
      The relevant checkin having the fix is
        [17150b71d2419a4db61140f860b58f7564be8ec9]
      of Jun 18.
      
    2. login: "aku"
    3. mimetype: "text/plain"
  4. Ticket change [9769208389] (rid 139307) by anonymous on 2014-08-19 17:09:00:

    1. icomment: "So, it will be fixed in Tcl 8.6.2 ?"
    2. login: "anonymous"
    3. mimetype: "text/plain"
    4. username: "jal_frezie"
  5. Ticket change [77a76ef3f5] (rid 139308) by aku on 2014-08-19 17:24:42:

    1. icomment:
      My mention of 8.5.16 was a typo. My apologies. I meant 8.6.2.
      The current RC archives can be found at
           ftp://ftp.tcl.tk/pub/tcl/tcl8_6/
      
    2. login: "aku"
    3. mimetype: "text/plain"
  6. Ticket change [52f11052f0] (rid 139394) by dkf on 2014-08-28 09:13:17:

    1. closedate changed to: "2456897.88422705"
    2. closer changed to: "dkf"
    3. icomment:
      This was a bug in the lappend compiler, [b43f2b49f7], which was generating code that didn't handle refcounts well in 8.6.1; the fact that using two simple lappends was a workaround was a pretty strong indicator of exactly that bug. Already fixed in 8.6.2.
      
    4. login: "dkf"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Duplicate"
    7. status changed to: "Closed"
    8. username: "dkf"