4 ms·
Totally agree that benchmarks should be taken with a grain of salt. I was scanning the ruby docs for Array and saw shift(n) so I thought it'd be fun to try it.
by sandrot 16y ago
Totally agree that benchmarks should be taken with a grain of salt. I was scanning the ruby docs for Array and saw shift(n) so I thought it'd be fun to try it.
I'm pretty ignorant about how the GC affects these benchmarks - I'd like to investigate that further in the future.