8 ms·
Chris, how would you respond to the remark that the article is comparing a flawed Mojo implementation against a more correct Rust implementation? https://news.y
by one-punch 3y ago
Chris, how would you respond to the remark that the article is comparing a flawed Mojo implementation against a more correct Rust implementation? https://news.ycombinator.com/item?id=39296559 https://news.ycombinator.com/item?id=39296559
> Insightful Reddit comment https://old.reddit.com/r/rust/comments/1al8cuc/modular_commu https://old.reddit.com/r/rust/comments/1al8cuc/modular_commu...
> > The TL;DR is that the Mojo implementation is fast because it essentially memchrs four times per read to find a newline, without any kind of validation or further checking. The memchr is manually implemented by loading a SIMD vector, and comparing it to 0x0a, and continuing if the result is all zeros. This is not a serious FASTQ parser. It cuts so many corners that it doesn't really make it comparable to other parsers (although I'm not crazy about Needletails somewhat similar approach either).
> > I implemented the same algorithm in < 100 lines of Julia and were >60% faster than the provided needletail benchmark, beating Mojo. I'm confident it could be done in Rust, too.
- chrislattner 3y agoAs far as I know, the Mojo implementation is doing the same algorithm as the baseline rust implementation. The person commenting on that is complaining about the rust impl as well.
- heuermh 3y agoHere is a cache of valid and invalid FASTQ files for unit tests https://github.com/biojava/biojava/tree/master/biojava-genome/src/test/resources/org/biojava/nbio/genome/io/fastq https://github.com/biojava/biojava/tree/master/biojava-genom...