Skip to main content
Commonmark migration
Source Link

#tcl, 58

tcl, 58

set i -1001;puts [time {time {puts [incr i]} 2001}]

testable on http://rextester.com/WQVC76600

Note: The answer is given as microseconds per iteration — The iterations here indicated belong to the outermost time command, which are implicitly 1 when its iterations parameter is omitted, which is the case; and not about the loop iterations!

#tcl, 58

set i -1001;puts [time {time {puts [incr i]} 2001}]

testable on http://rextester.com/WQVC76600

Note: The answer is given as microseconds per iteration — The iterations here indicated belong to the outermost time command, which are implicitly 1 when its iterations parameter is omitted, which is the case; and not about the loop iterations!

tcl, 58

set i -1001;puts [time {time {puts [incr i]} 2001}]

testable on http://rextester.com/WQVC76600

Note: The answer is given as microseconds per iteration — The iterations here indicated belong to the outermost time command, which are implicitly 1 when its iterations parameter is omitted, which is the case; and not about the loop iterations!

deleted 2 characters in body
Source Link
sergiol
  • 3.5k
  • 1
  • 15
  • 31

#tcl, 58

set i -1000
puts1001;puts [time {while \$i<=1000time {puts $i;incr[incr ii]} 2001}]

testable on http://rextester.com/RAMG26715http://rextester.com/WQVC76600

Note: The answer is given as microseconds per iteration — The iterations here indicated belong to the outermost time command, which are implicitly 1 when its iterations parameter is omitted, which is the case; and not about the loop iterations!

#tcl, 58

set i -1000
puts [time {while \$i<=1000 {puts $i;incr i}}]

testable on http://rextester.com/RAMG26715

Note: The answer is given as microseconds per iteration — The iterations here indicated belong to the time command, which are implicitly 1 when its iterations parameter is omitted, which is the case; and not about the loop iterations!

#tcl, 58

set i -1001;puts [time {time {puts [incr i]} 2001}]

testable on http://rextester.com/WQVC76600

Note: The answer is given as microseconds per iteration — The iterations here indicated belong to the outermost time command, which are implicitly 1 when its iterations parameter is omitted, which is the case; and not about the loop iterations!

Source Link
sergiol
  • 3.5k
  • 1
  • 15
  • 31

#tcl, 58

set i -1000
puts [time {while \$i<=1000 {puts $i;incr i}}]

testable on http://rextester.com/RAMG26715

Note: The answer is given as microseconds per iteration — The iterations here indicated belong to the time command, which are implicitly 1 when its iterations parameter is omitted, which is the case; and not about the loop iterations!