4 ms·
> "while" is up to 92% faster over 100000 repetitions Array#each_with_index 1.3768820762634277 secs 92% Slower while 0.107039
by pieter 16y ago
> "while" is up to 92% faster over 100000 repetitions
Array#each_with_index 1.3768820762634277 secs 92% Slower
while 0.10703921318054199 secs Fastest
Don't you mean it's around 13x fast (or 1200% faster)?
- Chirono 16y agoThis is always rather ambiguous terminology. For some people, it makes no sense for thing a to be more than 100% faster than thing b. Other people see it clearly meaning that thing a take half the time of thing b. What we really want to measure is time quantities rather than speed quantities. I find comparisons of time much easier to grasp than comparisons of speed.