5 ms·
Your benchmark doesn't specify which implementation of Awk you're testing, and which version of it. Your code is verbose: length($0) shortens to just length:
by kazinator 9y ago
Your benchmark doesn't specify which implementation of Awk you're testing, and which version of it.
Your code is verbose: length($0) shortens to just length:
awk 'length > max { max = length } END { print max }'
The Perl seems to have an off-by-one error.