3 ms·
You're right - split_whitespace returns an iterator that yields string slices (&str) which are just views into the original string without allocation, though th
by ethan_smith 1y ago
You're right - split_whitespace returns an iterator that yields string slices (&str) which are just views into the original string without allocation, though the performance difference likely comes from avoiding the iterator indirection and boundary checks.