bgzf_getc is slow as it's a heavy function and not inlined. Most of the time though it's just an array fetch, so inline the basic form and revert to the function call for the complex form.
isgraph and all other ctype functions are slow. We assume ASCII and just do a naive implementation.
The speed benefits are (seconds):
Old New
Index GRCh38 13.4 8.4
Query chr1 1.7 0.9
Given a significant speed change for a small localised modification it seems worth while having.
bgzf_getc is slow as it's a heavy function and not inlined. Most of the time though it's just an array fetch, so inline the basic form and revert to the function call for the complex form.
isgraph and all other ctype functions are slow. We assume ASCII and just do a naive implementation.
The speed benefits are (seconds):
Given a significant speed change for a small localised modification it seems worth while having.