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 2012-03-29 21:05

>>126
x86   Intel Pentium 4  0.447 MIPS/MHz/thread
When a company has as many orders of magnitude of dollars more than their competitors as Intel does, they could make any CPU architecture run fast. If /prog/ had 100 times more money than Intel, /prog/ could make a 10 THz Brainfuck CPU and then buy out all of the Intel fabs (like Intel did to DEC/COMPAQ and HP). Who needs multiplication instructions when you have 300 million transistors for ``BrainFuckFusion'' to analyze Brainfuck loops?

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