-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstring_equals.wren
24 lines (21 loc) · 931 Bytes
/
string_equals.wren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var start = System.clock
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
if ("changed one character" == "changed !ne character") count = count + 1
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
}
System.print(count)
System.print("elapsed: %(System.clock - start)")