summaryrefslogtreecommitdiff
path: root/benchmark/string_casecmp.yml
blob: 2354040a049e3f22a0c938b4f4535fef07082a3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
prelude: |
  lstr1 = [*"a".."z",*"0".."9"].join("")
  lstr10 = lstr1 * 10
  lstr100 = lstr10 * 10
  lstr1000 = lstr100 * 10
  lnonascii1 = [*"\u{e0}".."\u{ff}"].join("")
  lnonascii10 = lnonascii1 * 10
  lnonascii100 = lnonascii10 * 10
  lnonascii1000 = lnonascii100 * 10
  ustr1 = [*"A".."Z",*"0".."9"].join("")
  ustr10 = ustr1 * 10
  ustr100 = ustr10 * 10
  ustr1000 = ustr100 * 10
  unonascii1 = [*"\u{c0}".."\u{df}"].join("")
  unonascii10 = unonascii1 * 10
  unonascii100 = unonascii10 * 10
  unonascii1000 = unonascii100 * 10
benchmark:
  casecmp-1: lstr1.casecmp(ustr1)
  casecmp-10: lstr10.casecmp(ustr10)
  casecmp-100: lstr100.casecmp(ustr100)
  casecmp-1000: lstr1000.casecmp(ustr1000)
  casecmp-nonascii1: lnonascii1.casecmp(unonascii1)
  casecmp-nonascii10: lnonascii10.casecmp(unonascii10)
  casecmp-nonascii100: lnonascii100.casecmp(unonascii100)
  casecmp-nonascii1000: lnonascii1000.casecmp(unonascii1000)