From 08b02e67bf97cb315f292750c10d4b65b2a768a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sun, 19 Jan 2020 22:09:50 +0100 Subject: [PATCH] chuck test --- benchmark/string-equals.ck | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 benchmark/string-equals.ck 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 >>>; -- 2.43.0