I'm JITing a high-level language to asm.js. For the given function I'm JITing, I have information at branch points as to whether a branch is taken or not. Is it possible to reorder asm.js conditional statements to take advantage of this information?
Would changing this conditional statement:
if ( a >> 0 > b >> 0 )
{
// do A
}
else
{
// do B
}
to this
if ( a >> 0 <= b >> 0 )
{
// do B
}
else
{
// do A
}
if one branch is taken 90% of the time reliably result in different performance characteristics?