We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Assuming the machine is little-endian, a reversed chain of contiguous unsigned icmps could be merged. For example,
struct Foo { unsigned short n; unsigned char o; unsigned char p; }; int compare(struct Foo *f1, struct Foo *f2) { if (f1->p > f2->p) return 1; if (f1->p < f2->p) return -1; if (f1->o > f2->o) return 1; if (f1->o < f2->o) return -1; if (f1->n > f2->n) return 1; if (f1->n < f2->n) return -1; return 0; }
the function compare() could be transformed as below,
compare()
int compare(struct Foo *f1, struct Foo *f2) { unsigned int a = *(unsigned int *)&(f1->n); unsigned int b = *(unsigned int *)&(f2->n); return a > b ? 1 : a < b ? -1 : 0; }
This kind of pattern is found in velvet (a de novo genome assembler), more specificly the hot function compareKmers().
compareKmers()
The text was updated successfully, but these errors were encountered:
Seems too high level.
Sorry, something went wrong.
No branches or pull requests
Assuming the machine is little-endian, a reversed chain of contiguous unsigned icmps could be merged. For example,
the function
compare()
could be transformed as below,This kind of pattern is found in velvet (a de novo genome assembler), more specificly the hot function
compareKmers()
.The text was updated successfully, but these errors were encountered: