Posted to tcl by apn at Fri Apr 22 11:09:29 GMT 2022view raw

  1. D:\src\tcltk\list-redux\tcl\win>tclsh
  2. % info patch
  3. 8.6.12
  4. % set l [lrepeat 10000 x] ; llength $l
  5. 10000
  6. % proc p {l} {while {[llength $l]} {set l [lrange $l 1 end]}}
  7. % time {p $l} 10
  8. 151618.68 microseconds per iteration
  9. % exit
  10.  
  11.  
  12. D:\src\tcltk\list-redux\tcl\win>Release_AMD64_VC1916\tclsh87
  13. % info patch
  14. 8.7a6
  15. % proc p {l} {while {[llength $l]} {set l [lrange $l 1 end]}}
  16. % set l [lrepeat 10000 x] ; llength $l
  17. 10000
  18. % time {p $l} 10
  19. 1142.96 microseconds per iteration