samtools / htsjdk

A Java API for high-throughput sequencing data (HTS) formats.
http://samtools.github.io/htsjdk/
278 stars 244 forks source link

Remove validateArg call with a high invocation count when writing CRAM. #1603

Closed cmnbroad closed 9 months ago

cmnbroad commented 2 years ago

The containing method gets called frequently, and the validateArg call shows up as a hotspot (3-4%) when profiling writing CRAM .

cmnbroad commented 2 years ago

I think the likelihood of issues is low, but its probably worth at least profiling to see if inlining helps. The main issue is that the variable being tested isn't mutated by this call; so another option would be to move this to where its mutated, which might be much less overhead. So I'll experiment a bit more.

cmnbroad commented 9 months ago

We're integrating this as part of Yash's codecs PRs.