summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/bm_string_index.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/benchmark/bm_string_index.rb b/benchmark/bm_string_index.rb
new file mode 100644
index 0000000000..7783111082
--- /dev/null
+++ b/benchmark/bm_string_index.rb
@@ -0,0 +1,3 @@
+str1 = "あ" * 1024 + "い" # not single byte optimizable
+str2 = "い"
+100_000.times { str1.index(str2) }