lowercase
run at Mon Jan 2 21:30:45 CET 2023
run on macOS 13.0.1 arm64 Darwin
benchmark v0.6.7
LANG = en_US.UTF-8
Convert text to lowercase: using awk
Command: 'awk {print tolower($0)}'
Before: 'ŁORÈM ÎPSÙM DÔLÕR SIT AMÉT ŒßÞ'
After : 'łorèm îpsùm dôlõr sit amét œßþ'
- Binary: /opt/homebrew/Cellar/gawk/5.2.0/bin/gawk (652K)
- Version: GNU Awk 5.2.0, API 3.2, (GNU MPFR 4.1.0-p13, GNU MP 6.2.1)
- Throughput speed:
93 MB/sec
- Invocation speed:
211 ops/sec (4.74 millisec)
Convert text to lowercase: using perl
Command: 'perl -ne print lc'
Before: 'ŁORÈM ÎPSÙM DÔLÕR SIT AMÉT ŒßÞ'
After : 'ŁorÈm ÎpsÙm dÔlÕr sit amÉt ŒßÞ'
- Binary: /usr/bin/perl (20K)
- Version:
- Throughput speed:
535 MB/sec
- Invocation speed:
228 ops/sec (4.38 millisec)
Convert text to lowercase: using perl
Command: 'perl -CSA -ne use utf8; binmode STDOUT, ":utf8"; print lc'
Before: 'ŁORÈM ÎPSÙM DÔLÕR SIT AMÉT ŒßÞ'
After : 'łorèm îpsùm dôlõr sit amét œßþ'
- Binary: /usr/bin/perl (20K)
- Version:
- Throughput speed:
101 MB/sec
- Invocation speed:
221 ops/sec (4.53 millisec)
Convert text to lowercase: using php
Command: 'php -r while($f = fgets(STDIN)){ print strtolower($f); }'
Before: 'ŁORÈM ÎPSÙM DÔLÕR SIT AMÉT ŒßÞ'
After : 'ŁorÈm ÎpsÙm dÔlÕr sit amÉt ŒßÞ'
- Binary: /opt/homebrew/Cellar/php/8.2.0/bin/php (15M)
- Version: PHP 8.2.0 (cli) (built: Dec 9 2022 16:30:32) (NTS)
- Throughput speed:
191 MB/sec
- Invocation speed:
50 ops/sec (20.01 millisec)
Convert text to lowercase: using php
Command: 'php -r while($f = fgets(STDIN)){ print mb_strtolower($f); }'
Before: 'ŁORÈM ÎPSÙM DÔLÕR SIT AMÉT ŒßÞ'
After : 'łorèm îpsùm dôlõr sit amét œßþ'
- Binary: /opt/homebrew/Cellar/php/8.2.0/bin/php (15M)
- Version: PHP 8.2.0 (cli) (built: Dec 9 2022 16:30:32) (NTS)
- Throughput speed:
84 MB/sec
- Invocation speed:
51 ops/sec (19.63 millisec)
Convert text to lowercase: using sed
Command: 'sed -e s/\(.*\)/\L\1/'
Before: 'ŁORÈM ÎPSÙM DÔLÕR SIT AMÉT ŒßÞ'
After : 'LŁORÈM ÎPSÙM DÔLÕR SIT AMÉT ŒßÞ'
- Binary: /usr/bin/sed (44K)
- Throughput speed:
50 MB/sec
- Invocation speed:
896 ops/sec (1.12 millisec)
Convert text to lowercase: using sed
Command: 'sed y/ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÄÆÃÅĀǍÇĆČÈÉÊËĒĖĘĚÎÏÍÍĪĮÌǏ...'
Before: 'ŁORÈM ÎPSÙM DÔLÕR SIT AMÉT ŒßÞ'
After : ''
- Binary: /usr/bin/sed (44K)
- Throughput speed:
5263 MB/sec
- Invocation speed:
917 ops/sec (1.09 millisec)
Convert text to lowercase: using tr
Command: 'tr [:upper:] [:lower:]'
Before: 'ŁORÈM ÎPSÙM DÔLÕR SIT AMÉT ŒßÞ'
After : 'łorèm îpsùm dôlõr sit amét œßþ'
- Binary: /usr/bin/tr (24K)
- Throughput speed:
25 MB/sec
- Invocation speed:
725 ops/sec (1.38 millisec)
Convert text to lowercase: using ${line,,}
Command: '${line,,}'
Before: 'ŁORÈM ÎPSÙM DÔLÕR SIT AMÉT ŒßÞ'
After : 'łorèm îpsùm dôlõr sit amét œßþ' (LANG = en_US.UTF-8)
- Throughput speed:
8 MB/sec
- Invocation speed:
7463 ops/sec (0.13 millisec)