DEV Community

Discussion on: Which Programming language is faster at reading?

Collapse
 
miketalbot profile image
Mike Talbot ⭐ • Edited

Are you not really also testing the implementation of finding a string in a block, rather than reading. I'm presuming some of the "odd" timings may be down to how this is implemented?

For example in Rust you are using match and the haystack thing, rather than find - not enough of a Rust programmer to comment on which is better, but there does at least seem to be a choice of method.

Collapse
 
ecyrbe profile image
ecyrbe

Yes, i also think the rust bad results may come from find_subsequence impl in rust.
Indeed, it's creating a slice iterator that will generate an iterator over 65536 arrays then launch a find algorithm over the iterator.
But maybe the rust issue comes from elsewhere. We should measure.