3 ms·
Also it's using checked indexing, which apart from being not idiomatic, is also going to slow things down. A fairer comparison would be to use the unchecked ind
by hgomersall 3y ago
Also it's using checked indexing, which apart from being not idiomatic, is also going to slow things down. A fairer comparison would be to use the unchecked indexing variants.
- neonsunset 3y agoYeah, it's a similar problem in C# - ported code 1:1 is not representative since it now can't do out of bounds accesses and is therefore safe but comes at a cost of bounds checks which can be manually elided.
- vlovich123 3y agoUnchecked indexing is unidiomatic. A more fair comparison world be using iterators if possible but otherwise you have to live with that.