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: Anonymous 2011-09-28 11:44

If I had followed standards... no innovation... failure.  Cannot win without breaking standards.

I marvel at the stupidity of these people:
http://wiki.osdev.org/Main_Page

Have you ever met a musician in a band that is ripping-off the sound of some trend?  They are totally clueless that unoriginal is worthless and they are delsuionally proud because they think they're good.

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