2019-04-17 01:34:46 -04:00
|
|
|
prelude: |
|
2020-05-12 02:50:15 -04:00
|
|
|
str1 = [*0..5].join(" ") + " "
|
|
|
|
str10 = str1 * 10
|
|
|
|
str100 = str10 * 10
|
|
|
|
str1000 = str100 * 10
|
2019-04-17 01:34:46 -04:00
|
|
|
benchmark:
|
2020-05-12 02:50:15 -04:00
|
|
|
to_chars-1: str1.split('')
|
|
|
|
to_chars-10: str10.split('')
|
|
|
|
to_chars-100: str100.split('')
|
|
|
|
to_chars-1000: str1000.split('')
|
|
|
|
to_words-1: str1.split(' ')
|
|
|
|
to_words-10: str10.split(' ')
|
|
|
|
to_words-100: str100.split(' ')
|
|
|
|
to_words-1000: str1000.split(' ')
|
2020-05-12 09:59:58 -04:00
|
|
|
re_chars-1: str1.split(//)
|
|
|
|
re_chars-10: str10.split(//)
|
|
|
|
re_chars-100: str100.split(//)
|
|
|
|
re_chars-1000: str1000.split(//)
|
2020-05-12 02:50:15 -04:00
|
|
|
re_space-1: str1.split(/ /)
|
|
|
|
re_space-10: str10.split(/ /)
|
|
|
|
re_space-100: str100.split(/ /)
|
|
|
|
re_space-1000: str1000.split(/ /)
|