3 ms·
There already is an efficient multithreaded C version on the shootout site. I don't know if that's what people would consider good production code, but at least
by alayne 14y ago
There already is an efficient multithreaded C version on the shootout site. I don't know if that's what people would consider good production code, but at least it isn't laughably bad.
http://benchmarksgame.alioth.debian.org/u32/program.php?test=revcomp&lang=gcc&id=2 http://benchmarksgame.alioth.debian.org/u32/program.php?test...
- ay 14y agoOn my 64-bit MBP, this program does not terminate - at least not within the 3 minutes I allowed it to run. (the blog article's one completes within 4 seconds, so I thought 60-fold slack is enough). I did not debug it though.
- igouy 14y ago64-bit Ubuntu -- 0.7s http://benchmarksgame.alioth.debian.org/u64q/program.php?test=revcomp&lang=gcc&id=2 http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...
- ay 14y agoI know it works on Ubuntu 64-bit. :-) Just that it appears to be hanging on MacOS 64-bit. The algorithms like this one should hardly have such a catastrophic failure - that's why I am curious if someone else can replicate it hanging on MacOS. BTW, on 8-core Ubuntu box with 32Gb RAM, my silly half-an-hour hack from yesterday - http://stdio.be/revseq.c http://stdio.be/revseq.c - still outperforms this one and completes in 60% of time. So I am getting more and more convinced that either I did not get the spec right while writing it.. Or that I should submit it :-) EDIT: If you have a chance to give it a whirl alongside, could be fun to compare your results with mine...