strings.bm 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  1. ;;; -*- Mode: scheme; coding: utf-8; -*-
  2. ;;; strings.bm
  3. ;;;
  4. ;;; Copyright (C) 2011 Free Software Foundation, Inc.
  5. ;;;
  6. ;;;
  7. ;;; This program is free software; you can redistribute it and/or
  8. ;;; modify it under the terms of the GNU Lesser General Public License
  9. ;;; as published by the Free Software Foundation; either version 3, or
  10. ;;; (at your option) any later version.
  11. ;;;
  12. ;;; This program is distributed in the hope that it will be useful,
  13. ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ;;; GNU Lesser General Public License for more details.
  16. ;;;
  17. ;;; You should have received a copy of the GNU Lesser General Public
  18. ;;; License along with this software; see the file COPYING.LESSER. If
  19. ;;; not, write to the Free Software Foundation, Inc., 51 Franklin
  20. ;;; Street, Fifth Floor, Boston, MA 02110-1301 USA
  21. (define-module (benchmarks strings)
  22. #:use-module (benchmark-suite lib)
  23. #:use-module (ice-9 i18n))
  24. (use-modules (ice-9 i18n))
  25. (seed->random-state 1)
  26. ;; Start from a known locale state
  27. (setlocale LC_ALL "C")
  28. (define char-set:cased (char-set-union char-set:lower-case
  29. char-set:upper-case
  30. char-set:title-case))
  31. (define *latin1*
  32. (char-set->list (char-set-xor
  33. (char-set-intersection (ucs-range->char-set 0 255)
  34. char-set:cased)
  35. (->char-set #\µ)))) ; Can't do a case-insensitive comparison of a string
  36. ; with mu in fr_FR.iso88591 since it case-folds into a
  37. ; non-Latin-1 character.
  38. (define *cased*
  39. (char-set->list char-set:cased))
  40. (define (random-string c-list n)
  41. (let ((len (length c-list)))
  42. (apply string
  43. (map
  44. (lambda (x)
  45. (list-ref c-list (random len)))
  46. (iota n)))))
  47. (define (diff-at-start str)
  48. (string-append "!" (substring str 1)))
  49. (define (diff-in-middle str)
  50. (let ((x (floor (/ (string-length str) 2))))
  51. (string-append (substring str 0 x)
  52. "!"
  53. (substring str (1+ x)))))
  54. (define (diff-at-end str)
  55. (string-append (substring str 0 (1- (string-length str)))
  56. "!"))
  57. (define short-latin1-string (random-string *latin1* 10))
  58. (define medium-latin1-string (random-string *latin1* 100))
  59. (define long-latin1-string (random-string *latin1* 1000))
  60. (define short-latin1-string-diff-at-start (diff-at-start short-latin1-string))
  61. (define medium-latin1-string-diff-at-start (diff-at-start medium-latin1-string))
  62. (define long-latin1-string-diff-at-start (diff-at-start long-latin1-string))
  63. (define short-latin1-string-diff-in-middle (diff-in-middle short-latin1-string))
  64. (define medium-latin1-string-diff-in-middle (diff-in-middle medium-latin1-string))
  65. (define long-latin1-string-diff-in-middle (diff-in-middle long-latin1-string))
  66. (define short-latin1-string-diff-at-end (diff-at-end short-latin1-string))
  67. (define medium-latin1-string-diff-at-end (diff-at-end medium-latin1-string))
  68. (define long-latin1-string-diff-at-end (diff-at-end long-latin1-string))
  69. (define short-cased-string (random-string *cased* 10))
  70. (define medium-cased-string (random-string *cased* 100))
  71. (define long-cased-string (random-string *cased* 1000))
  72. (define short-cased-string-diff-at-start (diff-at-start short-cased-string))
  73. (define medium-cased-string-diff-at-start (diff-at-start medium-cased-string))
  74. (define long-cased-string-diff-at-start (diff-at-start long-cased-string))
  75. (define short-cased-string-diff-in-middle (diff-in-middle short-cased-string))
  76. (define medium-cased-string-diff-in-middle (diff-in-middle medium-cased-string))
  77. (define long-cased-string-diff-in-middle (diff-in-middle long-cased-string))
  78. (define short-cased-string-diff-at-end (diff-at-end short-cased-string))
  79. (define medium-cased-string-diff-at-end (diff-at-end medium-cased-string))
  80. (define long-cased-string-diff-at-end (diff-at-end long-cased-string))
  81. (define %french-locale-name "fr_FR.ISO-8859-1")
  82. (define %french-utf8-locale-name "fr_FR.UTF-8")
  83. (define %french-locale
  84. (false-if-exception
  85. (make-locale (list LC_CTYPE LC_COLLATE LC_NUMERIC LC_TIME)
  86. %french-locale-name)))
  87. (define %french-utf8-locale
  88. (false-if-exception
  89. (make-locale (list LC_CTYPE LC_COLLATE LC_NUMERIC LC_TIME)
  90. %french-utf8-locale-name)))
  91. (define (under-locale-or-unresolved locale thunk)
  92. ;; On non-GNU systems, an exception may be raised only when the locale is
  93. ;; actually used rather than at `make-locale'-time. Thus, we must guard
  94. ;; against both.
  95. (if locale
  96. (if (string-contains %host-type "-gnu")
  97. (thunk)
  98. (catch 'system-error thunk
  99. (lambda (key . args)
  100. (throw 'unresolved))))
  101. (throw 'unresolved)))
  102. (define (under-french-locale-or-unresolved thunk)
  103. (under-locale-or-unresolved %french-locale thunk))
  104. (define (under-french-utf8-locale-or-unresolved thunk)
  105. (under-locale-or-unresolved %french-utf8-locale thunk))
  106. (define (string-op str1 str2)
  107. (string<? str1 str2)
  108. (string>? str1 str2))
  109. (define (string-ci-op str1 str2)
  110. (string-ci<? str1 str2)
  111. (string-ci>? str1 str2))
  112. (define (string-fr-op str1 str2)
  113. (under-french-locale-or-unresolved
  114. (lambda ()
  115. (string-locale<? str1 str2 %french-locale)
  116. (string-locale>? str1 str2 %french-locale))))
  117. (define (string-fr-utf8-op str1 str2)
  118. (under-french-utf8-locale-or-unresolved
  119. (lambda ()
  120. (string-locale<? str1 str2 %french-utf8-locale)
  121. (string-locale>? str1 str2 %french-utf8-locale))))
  122. (define (string-fr-ci-op str1 str2)
  123. (under-french-locale-or-unresolved
  124. (lambda ()
  125. (string-locale-ci<? str1 str2 %french-locale)
  126. (string-locale-ci>? str1 str2 %french-locale))))
  127. (define (string-fr-utf8-ci-op str1 str2)
  128. (under-french-utf8-locale-or-unresolved
  129. (lambda ()
  130. (string-locale-ci<? str1 str2 %french-utf8-locale)
  131. (string-locale-ci>? str1 str2 %french-utf8-locale))))
  132. (with-benchmark-prefix "string ops"
  133. (with-benchmark-prefix "short Latin1"
  134. (benchmark "compare initially differing strings" 100000
  135. (string-op short-latin1-string short-latin1-string-diff-at-start))
  136. (benchmark "compare medially differing strings" 100000
  137. (string-op short-latin1-string short-latin1-string-diff-in-middle))
  138. (benchmark "compare terminally differing strings" 100000
  139. (string-op short-latin1-string short-latin1-string-diff-at-end))
  140. (benchmark "compare identical strings" 100000
  141. (string-op short-latin1-string short-latin1-string))
  142. (benchmark "case compare initially differing strings" 100000
  143. (string-ci-op short-latin1-string short-latin1-string-diff-at-start))
  144. (benchmark "case compare medially differing strings" 100000
  145. (string-ci-op short-latin1-string short-latin1-string-diff-in-middle))
  146. (benchmark "case compare terminally differing strings" 100000
  147. (string-ci-op short-latin1-string short-latin1-string-diff-at-end))
  148. (benchmark "case compare identical strings" 100000
  149. (string-ci-op short-latin1-string short-latin1-string))
  150. (benchmark "French Latin-1 locale compare initially differing strings" 100000
  151. (string-fr-op short-latin1-string short-latin1-string-diff-at-start))
  152. (benchmark "French Latin-1 locale compare medially differing strings" 100000
  153. (string-fr-op short-latin1-string short-latin1-string-diff-in-middle))
  154. (benchmark "French Latin-1 locale compare terminally differing strings" 100000
  155. (string-fr-op short-latin1-string short-latin1-string-diff-at-end))
  156. (benchmark "French Latin-1 locale compare identical strings" 100000
  157. (string-fr-op short-latin1-string short-latin1-string))
  158. (benchmark "French Latin-1 locale case compare initially differing strings" 100000
  159. (string-fr-ci-op short-latin1-string short-latin1-string-diff-at-start))
  160. (benchmark "French Latin-1 locale case compare medially differing strings" 100000
  161. (string-fr-ci-op short-latin1-string short-latin1-string-diff-in-middle))
  162. (benchmark "French Latin-1 locale case compare terminally differing strings" 100000
  163. (string-fr-ci-op short-latin1-string short-latin1-string-diff-at-end))
  164. (benchmark "French Latin-1 locale case compare identical strings" 100000
  165. (string-fr-ci-op short-latin1-string short-latin1-string))
  166. (benchmark "French UTF-8 locale compare initially differing strings" 100000
  167. (string-fr-utf8-op short-latin1-string short-latin1-string-diff-at-start))
  168. (benchmark "French UTF-8 locale compare medially differing strings" 100000
  169. (string-fr-utf8-op short-latin1-string short-latin1-string-diff-in-middle))
  170. (benchmark "French UTF-8 locale compare terminally differing strings" 100000
  171. (string-fr-utf8-op short-latin1-string short-latin1-string-diff-at-end))
  172. (benchmark "French UTF-8 locale compare identical strings" 100000
  173. (string-fr-utf8-op short-latin1-string short-latin1-string))
  174. (benchmark "French UTF-8 locale case compare initially differing strings" 100000
  175. (string-fr-utf8-ci-op short-latin1-string short-latin1-string-diff-at-start))
  176. (benchmark "French UTF-8 locale case compare medially differing strings" 100000
  177. (string-fr-utf8-ci-op short-latin1-string short-latin1-string-diff-in-middle))
  178. (benchmark "French UTF-8 locale case compare terminally differing strings" 100000
  179. (string-fr-utf8-ci-op short-latin1-string short-latin1-string-diff-at-end))
  180. (benchmark "French UTF-8 locale case compare identical strings" 100000
  181. (string-fr-utf8-ci-op short-latin1-string short-latin1-string)))
  182. (with-benchmark-prefix "medium Latin1"
  183. (benchmark "compare initially differing strings" 10000
  184. (string-op medium-latin1-string medium-latin1-string-diff-at-start))
  185. (benchmark "compare medially differing strings" 10000
  186. (string-op medium-latin1-string medium-latin1-string-diff-in-middle))
  187. (benchmark "compare terminally differing strings" 10000
  188. (string-op medium-latin1-string medium-latin1-string-diff-at-end))
  189. (benchmark "compare identical strings" 10000
  190. (string-op medium-latin1-string medium-latin1-string))
  191. (benchmark "case compare initially differing strings" 10000
  192. (string-ci-op medium-latin1-string medium-latin1-string-diff-at-start))
  193. (benchmark "case compare medially differing strings" 10000
  194. (string-ci-op medium-latin1-string medium-latin1-string-diff-in-middle))
  195. (benchmark "case compare terminally differing strings" 10000
  196. (string-ci-op medium-latin1-string medium-latin1-string-diff-at-end))
  197. (benchmark "case compare identical strings" 10000
  198. (string-ci-op medium-latin1-string medium-latin1-string))
  199. (benchmark "French Latin-1 locale compare initially differing strings" 10000
  200. (string-fr-op medium-latin1-string medium-latin1-string-diff-at-start))
  201. (benchmark "French Latin-1 locale compare medially differing strings" 10000
  202. (string-fr-op medium-latin1-string medium-latin1-string-diff-in-middle))
  203. (benchmark "French Latin-1 locale compare terminally differing strings" 10000
  204. (string-fr-op medium-latin1-string medium-latin1-string-diff-at-end))
  205. (benchmark "French Latin-1 locale compare identical strings" 10000
  206. (string-fr-op medium-latin1-string medium-latin1-string))
  207. (benchmark "French Latin-1 locale case compare initially differing strings" 10000
  208. (string-fr-ci-op medium-latin1-string medium-latin1-string-diff-at-start))
  209. (benchmark "French Latin-1 locale case compare medially differing strings" 10000
  210. (string-fr-ci-op medium-latin1-string medium-latin1-string-diff-in-middle))
  211. (benchmark "French Latin-1 locale case compare terminally differing strings" 10000
  212. (string-fr-ci-op medium-latin1-string medium-latin1-string-diff-at-end))
  213. (benchmark "French Latin-1 locale case compare identical strings" 10000
  214. (string-fr-ci-op medium-latin1-string medium-latin1-string))
  215. (benchmark "French UTF-8 locale compare initially differing strings" 10000
  216. (string-fr-utf8-op medium-latin1-string medium-latin1-string-diff-at-start))
  217. (benchmark "French UTF-8 locale compare medially differing strings" 10000
  218. (string-fr-utf8-op medium-latin1-string medium-latin1-string-diff-in-middle))
  219. (benchmark "French UTF-8 locale compare terminally differing strings" 10000
  220. (string-fr-utf8-op medium-latin1-string medium-latin1-string-diff-at-end))
  221. (benchmark "French UTF-8 locale compare identical strings" 10000
  222. (string-fr-utf8-op medium-latin1-string medium-latin1-string))
  223. (benchmark "French UTF-8 locale case compare initially differing strings" 10000
  224. (string-fr-utf8-ci-op medium-latin1-string medium-latin1-string-diff-at-start))
  225. (benchmark "French UTF-8 locale case compare medially differing strings" 10000
  226. (string-fr-utf8-ci-op medium-latin1-string medium-latin1-string-diff-in-middle))
  227. (benchmark "French UTF-8 locale case compare terminally differing strings" 10000
  228. (string-fr-utf8-ci-op medium-latin1-string medium-latin1-string-diff-at-end))
  229. (benchmark "French UTF-8 locale case compare identical strings" 10000
  230. (string-fr-utf8-ci-op medium-latin1-string medium-latin1-string)))
  231. (with-benchmark-prefix "long Latin1"
  232. (benchmark "compare initially differing strings" 1000
  233. (string-op long-latin1-string long-latin1-string-diff-at-start))
  234. (benchmark "compare medially differing strings" 1000
  235. (string-op long-latin1-string long-latin1-string-diff-in-middle))
  236. (benchmark "compare terminally differing strings" 1000
  237. (string-op long-latin1-string long-latin1-string-diff-at-end))
  238. (benchmark "compare identical strings" 1000
  239. (string-op long-latin1-string long-latin1-string))
  240. (benchmark "case compare initially differing strings" 1000
  241. (string-ci-op long-latin1-string long-latin1-string-diff-at-start))
  242. (benchmark "case compare medially differing strings" 1000
  243. (string-ci-op long-latin1-string long-latin1-string-diff-in-middle))
  244. (benchmark "case compare terminally differing strings" 1000
  245. (string-ci-op long-latin1-string long-latin1-string-diff-at-end))
  246. (benchmark "case compare identical strings" 1000
  247. (string-ci-op long-latin1-string long-latin1-string))
  248. (benchmark "French Latin-1 locale compare initially differing strings" 1000
  249. (string-fr-op long-latin1-string long-latin1-string-diff-at-start))
  250. (benchmark "French Latin-1 locale compare medially differing strings" 1000
  251. (string-fr-op long-latin1-string long-latin1-string-diff-in-middle))
  252. (benchmark "French Latin-1 locale compare terminally differing strings" 1000
  253. (string-fr-op long-latin1-string long-latin1-string-diff-at-end))
  254. (benchmark "French Latin-1 locale compare identical strings" 1000
  255. (string-fr-op long-latin1-string long-latin1-string))
  256. (benchmark "French Latin-1 locale case compare initially differing strings" 1000
  257. (string-fr-ci-op long-latin1-string long-latin1-string-diff-at-start))
  258. (benchmark "French Latin-1 locale case compare medially differing strings" 1000
  259. (string-fr-ci-op long-latin1-string long-latin1-string-diff-in-middle))
  260. (benchmark "French Latin-1 locale case compare terminally differing strings" 1000
  261. (string-fr-ci-op long-latin1-string long-latin1-string-diff-at-end))
  262. (benchmark "French Latin-1 locale case compare identical strings" 1000
  263. (string-fr-ci-op long-latin1-string long-latin1-string))
  264. (benchmark "French UTF-8 locale compare initially differing strings" 1000
  265. (string-fr-utf8-op long-latin1-string long-latin1-string-diff-at-start))
  266. (benchmark "French UTF-8 locale compare medially differing strings" 1000
  267. (string-fr-utf8-op long-latin1-string long-latin1-string-diff-in-middle))
  268. (benchmark "French UTF-8 locale compare terminally differing strings" 1000
  269. (string-fr-utf8-op long-latin1-string long-latin1-string-diff-at-end))
  270. (benchmark "French UTF-8 locale compare identical strings" 1000
  271. (string-fr-utf8-op long-latin1-string long-latin1-string))
  272. (benchmark "French UTF-8 locale case compare initially differing strings" 1000
  273. (string-fr-utf8-ci-op long-latin1-string long-latin1-string-diff-at-start))
  274. (benchmark "French UTF-8 locale case compare medially differing strings" 1000
  275. (string-fr-utf8-ci-op long-latin1-string long-latin1-string-diff-in-middle))
  276. (benchmark "French UTF-8 locale case compare terminally differing strings" 1000
  277. (string-fr-utf8-ci-op long-latin1-string long-latin1-string-diff-at-end))
  278. (benchmark "French UTF-8 locale case compare identical strings" 1000
  279. (string-fr-utf8-ci-op long-latin1-string long-latin1-string)))
  280. (with-benchmark-prefix "short Unicode"
  281. (benchmark "compare initially differing strings" 100000
  282. (string-op short-cased-string short-cased-string-diff-at-start))
  283. (benchmark "compare medially differing strings" 100000
  284. (string-op short-cased-string short-cased-string-diff-in-middle))
  285. (benchmark "compare terminally differing strings" 100000
  286. (string-op short-cased-string short-cased-string-diff-at-end))
  287. (benchmark "compare identical strings" 100000
  288. (string-op short-cased-string short-cased-string))
  289. (benchmark "case compare initially differing strings" 100000
  290. (string-ci-op short-cased-string short-cased-string-diff-at-start))
  291. (benchmark "case compare medially differing strings" 100000
  292. (string-ci-op short-cased-string short-cased-string-diff-in-middle))
  293. (benchmark "case compare terminally differing strings" 100000
  294. (string-ci-op short-cased-string short-cased-string-diff-at-end))
  295. (benchmark "case compare identical strings" 100000
  296. (string-ci-op short-cased-string short-cased-string))
  297. (benchmark "French UTF-8 locale compare initially differing strings" 100000
  298. (string-fr-utf8-op short-cased-string short-cased-string-diff-at-start))
  299. (benchmark "French UTF-8 locale compare medially differing strings" 100000
  300. (string-fr-utf8-op short-cased-string short-cased-string-diff-in-middle))
  301. (benchmark "French UTF-8 locale compare terminally differing strings" 100000
  302. (string-fr-utf8-op short-cased-string short-cased-string-diff-at-end))
  303. (benchmark "French UTF-8 locale compare identical strings" 100000
  304. (string-fr-utf8-op short-cased-string short-cased-string))
  305. (benchmark "French UTF-8 locale case compare initially differing strings" 100000
  306. (string-fr-utf8-ci-op short-cased-string short-cased-string-diff-at-start))
  307. (benchmark "French UTF-8 locale case compare medially differing strings" 100000
  308. (string-fr-utf8-ci-op short-cased-string short-cased-string-diff-in-middle))
  309. (benchmark "French UTF-8 locale case compare terminally differing strings" 100000
  310. (string-fr-utf8-ci-op short-cased-string short-cased-string-diff-at-end))
  311. (benchmark "French UTF-8 locale case compare identical strings" 100000
  312. (string-fr-utf8-ci-op short-cased-string short-cased-string)))
  313. (with-benchmark-prefix "medium Unicode"
  314. (benchmark "compare initially differing strings" 10000
  315. (string-op medium-cased-string medium-cased-string-diff-at-start))
  316. (benchmark "compare medially differing strings" 10000
  317. (string-op medium-cased-string medium-cased-string-diff-in-middle))
  318. (benchmark "compare terminally differing strings" 10000
  319. (string-op medium-cased-string medium-cased-string-diff-at-end))
  320. (benchmark "compare identical strings" 10000
  321. (string-op medium-cased-string medium-cased-string))
  322. (benchmark "case compare initially differing strings" 10000
  323. (string-ci-op medium-cased-string medium-cased-string-diff-at-start))
  324. (benchmark "case compare medially differing strings" 10000
  325. (string-ci-op medium-cased-string medium-cased-string-diff-in-middle))
  326. (benchmark "case compare terminally differing strings" 10000
  327. (string-ci-op medium-cased-string medium-cased-string-diff-at-end))
  328. (benchmark "case compare identical strings" 10000
  329. (string-ci-op medium-cased-string medium-cased-string))
  330. (benchmark "French UTF-8 locale compare initially differing strings" 10000
  331. (string-fr-utf8-op medium-cased-string medium-cased-string-diff-at-start))
  332. (benchmark "French UTF-8 locale compare medially differing strings" 10000
  333. (string-fr-utf8-op medium-cased-string medium-cased-string-diff-in-middle))
  334. (benchmark "French UTF-8 locale compare terminally differing strings" 10000
  335. (string-fr-utf8-op medium-cased-string medium-cased-string-diff-at-end))
  336. (benchmark "French UTF-8 locale compare identical strings" 10000
  337. (string-fr-utf8-op medium-cased-string medium-cased-string))
  338. (benchmark "French UTF-8 locale case compare initially differing strings" 10000
  339. (string-fr-utf8-ci-op medium-cased-string medium-cased-string-diff-at-start))
  340. (benchmark "French UTF-8 locale case compare medially differing strings" 10000
  341. (string-fr-utf8-ci-op medium-cased-string medium-cased-string-diff-in-middle))
  342. (benchmark "French UTF-8 locale case compare terminally differing strings" 10000
  343. (string-fr-utf8-ci-op medium-cased-string medium-cased-string-diff-at-end))
  344. (benchmark "French UTF-8 locale case compare identical strings" 10000
  345. (string-fr-utf8-ci-op medium-cased-string medium-cased-string)))
  346. (with-benchmark-prefix "long Unicode"
  347. (benchmark "compare initially differing strings" 1000
  348. (string-op long-cased-string long-cased-string-diff-at-start))
  349. (benchmark "compare medially differing strings" 1000
  350. (string-op long-cased-string long-cased-string-diff-in-middle))
  351. (benchmark "compare terminally differing strings" 1000
  352. (string-op long-cased-string long-cased-string-diff-at-end))
  353. (benchmark "compare identical strings" 1000
  354. (string-op long-cased-string long-cased-string))
  355. (benchmark "case compare initially differing strings" 1000
  356. (string-ci-op long-cased-string long-cased-string-diff-at-start))
  357. (benchmark "case compare medially differing strings" 1000
  358. (string-ci-op long-cased-string long-cased-string-diff-in-middle))
  359. (benchmark "case compare terminally differing strings" 1000
  360. (string-ci-op long-cased-string long-cased-string-diff-at-end))
  361. (benchmark "case compare identical strings" 1000
  362. (string-ci-op long-cased-string long-cased-string))
  363. (benchmark "French UTF-8 locale compare initially differing strings" 1000
  364. (string-fr-utf8-op long-cased-string long-cased-string-diff-at-start))
  365. (benchmark "French UTF-8 locale compare medially differing strings" 1000
  366. (string-fr-utf8-op long-cased-string long-cased-string-diff-in-middle))
  367. (benchmark "French UTF-8 locale compare terminally differing strings" 1000
  368. (string-fr-utf8-op long-cased-string long-cased-string-diff-at-end))
  369. (benchmark "French UTF-8 locale compare identical strings" 1000
  370. (string-fr-utf8-op long-cased-string long-cased-string))
  371. (benchmark "French UTF-8 locale case compare initially differing strings" 1000
  372. (string-fr-utf8-ci-op long-cased-string long-cased-string-diff-at-start))
  373. (benchmark "French UTF-8 locale case compare medially differing strings" 1000
  374. (string-fr-utf8-ci-op long-cased-string long-cased-string-diff-in-middle))
  375. (benchmark "French UTF-8 locale case compare terminally differing strings" 1000
  376. (string-fr-utf8-ci-op long-cased-string long-cased-string-diff-at-end))
  377. (benchmark "French UTF-8 locale case compare identical strings" 1000
  378. (string-fr-utf8-ci-op long-cased-string long-cased-string))))