Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c181bea8264d9ad5b28fcb994555f7f9ebb75cd6
Ticket: 735388ffffffffffffffffffffffffffffffffff
freeing lists takes nonlinear time
User & Date: msofer on 2003-05-09 18:48:00
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Freeing large arrays (or large numbers of arrays?)
    takes non-linear time on linux:
    
    % info patch
    8.5a0
    % for { set x 1 } { $x <  5} {incr x } {
         set data [list]
         set newcount [expr $x * 100000]
         for  {set i 0}  {$i <  $newcount } {incr i} {
                lappend data [ list $i.0 $i.1 $i.2 ]
          }
          puts -nonewline "listsize =  [llength $data]  "
          set unsetime  [ lindex [time { unset data }] 0 ]
          set unitTime [expr {$unsetime / $newcount}]
          puts " $unitTime us/item"
    }
    listsize =  100000   5 us/item
    listsize =  200000   20 us/item
    listsize =  300000   41 us/item
    listsize =  400000   60 us/item
    
    Notes:
    
    1. This does *not* happen with the threaded allocator
    
    2. The problem does not seem to appear in either W2000
    or Solaris
    
    3. It may be depend on the glibc/gcc version used: the
    above is with gcc-2.96 and glibc-2.2.4 (RH 7.1 builds).
    Rolf Ade reported linear time with gcc-3.2 and glibc-2.3.2
    
    See also clt threads at
    http://groups.google.com/groups?threadm=3EBBC0DC.7050805%40houston.rr.com
    http://groups.google.com.ar/groups?threadm=vbngfpddpjr1a7%40corp.supernews.com
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "msofer"
  9. subsystem changed to: "41. Memory Allocation"
  10. title changed to: "freeing lists takes nonlinear time"
  11. type changed to: "Bug"