Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 537805bb984283f2b9dba575fc12c8e6348c2dc13ba2fe6be9bba98d4a46b37c
Ticket: f5c01e42a759e6a01329256ab4c21b4402719526
Performance regression in 9.0 accessing dicts as lists
User & Date: apnadkarni on 2023-08-08 05:52:06
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    Reported by Paul O. on the core mailing list:
    
    Can anybody confirm the slow behaviour of the "array get" command in Tcl 9?
    Noticed on both Windows and Linux.
    
    Regards,
    Paul
    
    ```
    puts "Using Tcl [info patchlevel] on $tcl_platform(platform)"
    catch { puts "Build-Info: [tcl::build-info]" }
    
    set startTime [clock milliseconds]
    for { set i 1 } { $i < 6000 } { incr i } {
         set arr(Key-$i) "Value-$i"
    }
    puts "Build time: [expr { [clock milliseconds] - $startTime }] msec"
    
    set startTime [clock milliseconds]
    set tmp [list]
    foreach {key val} [array get arr "*"] {
         lappend tmp $val
    }
    puts "Get time  : [expr { [clock milliseconds] - $startTime }] msec"
    
    exit 0
    ```
    
  5. foundin changed to: "9.0"
  6. is_private changed to: "0"
  7. login: "apnadkarni"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "9546e9877f1a8899e25a89082561ee694e7fb402"
  10. resolution changed to: "None"
  11. severity changed to: "Severe"
  12. status changed to: "Open"
  13. submitter changed to: "apnadkarni"
  14. subsystem changed to: "- New Builtin Commands"
  15. title changed to:
    Performance regression in 9.0 accessing dicts as lists
    
  16. type changed to: "Bug"