Posted to tcl by greycat at Wed Jun 27 18:08:03 GMT 2018view pretty
% proc a {} {set list {}}; proc b {} {set list ""}; proc c {} {set list []}; proc d {} {set list [list]} % time a 23 microseconds per iteration % time b 22 microseconds per iteration % time c 23 microseconds per iteration % time d 51 microseconds per iteration
Comments
Posted by CecilWesterhof at Thu Jun 28 14:59:44 GMT 2018 [text] [code]
The first three do not make a real difference. But the last you should not use I think. I was using [], but because of the chat I changed to {}.