Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Branch Misses

Name: Anonymous 2011-09-26 17:26

How bad do branch misses hurt a programs performance? In C and Java?

for example how big of an impact would :


int shitinanus()
{
    int val = getanus();
    if(val != 0)
        return ANALTONIGHT;
    return ALONETONIGHT;
}


be knowing that val will most likely be 0 99% of the time compared to the below function


int shitinanus()
{
    int val = getanus();
    if(val == 0)
        return ALONETONIGHT;
    return ANALTONIGHT;
}

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2011-09-28 19:55

>>69
Also, as per definition a standard encompasses the minimum common set of features for a given set of architectures, they always tend to deny support for newer technology (and by newer I actually mean "concurrent execution" and "networking" in pure C, as incredible as it seems),

Do you realize how much legacy code would break if you would attempt to incorporate "concurrent execution" and "networking" into the standard? I bet you don't.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List