Skip to content

Commit

Permalink
add builtin_expect for performance
Browse files Browse the repository at this point in the history
  • Loading branch information
Sawwave committed Feb 21, 2024
1 parent b07201b commit 54f6754
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FastaVector.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ bool fastaVectorGetLocalSequencePositionFromGlobal(
const struct FastaVector *const fastaVector,
const size_t globalSequencePosition,
struct FastaVectorLocalPosition *localPosition) {
if (localPosition == NULL) {
if (__builtin_expect(localPosition == NULL, 0)) {
return false;
}
// check to see if this is outside the bounds
Expand Down

0 comments on commit 54f6754

Please sign in to comment.