As of right now, my functioin finds the median of 3 numbers and sorts them, but it always makes three comparisons. I\'m thinking I can use a nested if statement somewhere so
If you only need the median value, here's a branch-less solution based on min/max operators:
median = max(min(a,b), min(max(a,b),c));
Intel CPU's have SSE min/max vector instructions, so depending on your or your compiler's ability to vectorize, this can run extremely fast.