Posted to tcl by apn at Fri Apr 22 11:09:29 GMT 2022view pretty
D:\src\tcltk\list-redux\tcl\win>tclsh % info patch 8.6.12 % set l [lrepeat 10000 x] ; llength $l 10000 % proc p {l} {while {[llength $l]} {set l [lrange $l 1 end]}} % time {p $l} 10 151618.68 microseconds per iteration % exit D:\src\tcltk\list-redux\tcl\win>Release_AMD64_VC1916\tclsh87 % info patch 8.7a6 % proc p {l} {while {[llength $l]} {set l [lrange $l 1 end]}} % set l [lrepeat 10000 x] ; llength $l 10000 % time {p $l} 10 1142.96 microseconds per iteration