Id: 9756; Nick: NaNg; Timestamp: 2008-04-26 12:22:02; Pasted as: mIRC
Description: n/a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
alias testloops {
  var %time = $ticks, %k = 0
  while (%k <= 1000000) {
    inc %k
  }
  var %while.inc $calc(($ticks - %time)/1000)
  echo -a A) inc completed in %while.inc secs
  var %time = $ticks, %k = 1000000
  while (%k >= 0) {
    dec %k
  }
  var %while.dec $calc(($ticks - %time)/1000)
  echo -a B) dec completed in $calc(($ticks - %time)/1000) secs
  echo -a C) The fastest loop: $iif(%while.dec > %while.inc,dec loops,inc loops) - Difference: $abs($calc(%while.inc - %while.dec)) secs
}
Options: New, Download,
, mIRC Parser;
Copyright © 2006 by Zyberdog - Some rights reserved. (Browse/Disclaimer/Stats/About)