Posted to tcl by Stu at Sun May 04 19:00:28 GMT 2008view pretty

set expand 100; set times 100
set d [string repeat [string map [list % {}] [exec -ignorestderr man n expr]] $expand]
puts [string length $d]
set d1 [string map [list the %1\$s is %2\$s that %3\$s] $d]
set d2 [string map [list the @te@ is @si@ that @ta@] $d]
puts [time { set dd1 [format $d1 the is that]} $times]
puts [time { set dd2 [string map [list @te@ the @si@ is @ta@ that] $d2] } $times]
puts [string equal $dd1 $dd2]