From: Jérémie Astor Date: Sun, 19 Jan 2020 21:09:50 +0000 (+0100) Subject: chuck test X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=08b02e67bf97cb315f292750c10d4b65b2a768a6;p=gwion.git chuck test --- diff --git a/benchmark/string-equals.ck b/benchmark/string-equals.ck new file mode 100644 index 00000000..3a817d00 --- /dev/null +++ b/benchmark/string-equals.ck @@ -0,0 +1,21 @@ +int count; +for (int i; i < 1000000; ++i) { + if ("abc" == "abc") ++count; + if ("a slightly longer string" == + "a slightly longer string") ++count; + if ("a significantly longer string but still not overwhelmingly long string" == + "a significantly longer string but still not overwhelmingly long string") ++count; + + if ("" == "abc") ++count; + if ("abc" == "abcd") ++count; + if ("changed one character" == "changed !ne character") ++count; +// if ("123" == 123) ++count + if ("a slightly longer string" == + "a slightly longer string!") ++count; + if ("a slightly longer string" == + "a slightly longer strinh") ++count; + if ("a significantly longer string but still not overwhelmingly long string" == + "another") ++count; +} + +<<< count >>>;