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 20:27

>>6

ARM   Cortex-A9:         0.2875 MIPS/MHz/thread
SPARC Sun UltraSPARC II: 0.7 MIPS/MHz/thread
MIPS  ICT Loongson 3A:   0.72 MIPS/MHz/thread
POWER IBM POWER7:        0.76 MIPS/MHz/thread
IA64  Itanium 2:         0.93 MIPS/MHz/thread
x86   AMD K5:            0.92 MIPS/MHz/thread
x86   Intel i5-2400:     1.24 MIPS/MHz/thread

WHERE IS YOUR RISC GOD NOW?

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