Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up faidx. #1797

Merged
merged 1 commit into from
Jul 8, 2024
Merged

Speed up faidx. #1797

merged 1 commit into from
Jul 8, 2024

Conversation

jkbonfield
Copy link
Contributor

  • 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):

                      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.
@whitwham whitwham merged commit f3d401c into samtools:develop Jul 8, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants