biod / sambamba

Tools for working with SAM/BAM data
http://thebird.nl/blog/D_Dragon.html
GNU General Public License v2.0
558 stars 104 forks source link

Article: a comparison of 3 programming languages #389

Closed andre2007 closed 5 years ago

andre2007 commented 5 years ago

Did you saw the article https://www.biorxiv.org/content/10.1101/558056v1? Is this an area in which your D implementation could do a better job than the 3 mentioned languages?

pjotrp commented 5 years ago

Hmmm. These comparisons are usually flawed. The programmer is the main bottleneck in my opinion. I bet if you study the implementation you can improve on it significantly (in any of the three languages).

Memory management is an issue, but it is more about algorithmic choices in general and implementation specific details.

D is a great programming language (to me) because it is non-opiniated. I.e., unlike Go, Rust and Java, there are multiple ways of solving things. You can use a garbage collector, or manual memory management. Or both. You can even use reference counting if you want to.

Sambamba uses GC, stack and manual heap allocation, depending on what works best in the context. One great asset is a ring buffer. Sambamba still outperforms most tools out there - even samtools which gets a lot of work. We are continuing down this D route. Very happy with that myself.

andre2007 commented 5 years ago

I fully agree with you:) My assumption is, the authors are not aware of the D Programming Language and miss this great library. Did you considered to share your insights with the authors of the article?

andre2007 commented 5 years ago

There is also some discussion here https://forum.dlang.org/thread/ytrwoshepnznbcghbtzt@forum.dlang.org

pjotrp commented 5 years ago

Yeah, I added my note.