2015-09-15 07:46:09 -07:00
|
|
|
var start = System.clock
|
2015-03-18 07:09:03 -07:00
|
|
|
|
|
|
|
|
var count = 0
|
|
|
|
|
for (i in 1..1000000) {
|
|
|
|
|
if ("abc" == "abc") count = count + 1
|
|
|
|
|
if ("a slightly longer string" ==
|
|
|
|
|
"a slightly longer string") count = count + 1
|
|
|
|
|
if ("a significantly longer string but still not overwhelmingly long string" ==
|
|
|
|
|
"a significantly longer string but still not overwhelmingly long string") count = count + 1
|
|
|
|
|
|
|
|
|
|
if ("" == "abc") count = count + 1
|
|
|
|
|
if ("abc" == "abcd") count = count + 1
|
2015-11-11 07:55:48 -08:00
|
|
|
if ("changed one character" == "changed !ne character") count = count + 1
|
2015-03-18 07:09:03 -07:00
|
|
|
if ("123" == 123) count = count + 1
|
|
|
|
|
if ("a slightly longer string" ==
|
|
|
|
|
"a slightly longer string!") count = count + 1
|
|
|
|
|
if ("a slightly longer string" ==
|
|
|
|
|
"a slightly longer strinh") count = count + 1
|
|
|
|
|
if ("a significantly longer string but still not overwhelmingly long string" ==
|
|
|
|
|
"another") count = count + 1
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-15 07:46:09 -07:00
|
|
|
System.print(count)
|
2015-11-11 07:55:48 -08:00
|
|
|
System.print("elapsed: %(System.clock - start)")
|