noamteyssier
Joined 1 year ago
Joined 1 year ago
Would be interesting to try this out
What I'm really optimizing here is the functional equivalent of `sort | uniq -c | sort -n`
``` clang \ -g -ggdb -O3 \ -Wall -Wextra -Wpointer-arith \ -D_FORTIFY_SOURCE=2 -fPIE \ mmuniq.c \ -lm \ -Wl,-z,now -Wl,-z,relro \ -o mmuniq mmuniq.c:1:10: fatal error: 'byteswap.h' file not found 1 | #include <byteswap.h> | ^~~~~~~~~~~~ 1 error generated. make: ** [mmuniq] Error 1 ```
It may not be the most fair comparison because with these random fastqs I'm generating the vast majority of the input is unique so it could be overloading the cuckoo filter.
You don't really end up using these results in any specific analysis but it's super helpful for troubleshooting tools or edge-cases.
But you're right - it will be limited by RAM in a way the unix tools are not.
I did add a test with sort using a larger buffer size to the benchmarks as well.
You're right that the `cat` is unnecessary - and removing it actually had some marginal gains to the naive solution. I've updated the benchmarks to show this
Cheers
So in those settings I think it's absolutely worth it