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 22:55

>>129
``MIPS/MHz'' is an absolutely meaningless statement. What processor are these ``MIPS'' measured for? What is considered an ``instruction''? Are all ``instructions'' weighted equally? Are page faults and cache misses taken into account? Is the CPU run in 32-bit or 64-bit mode (if applicable)?
MCST Elbrus-3S (1891WM5AyA) CPU, 500 MHz, 218M transistors, 90 nm, 9-metal layer, 142 mm2. Power: 13-20W.
Power usage is also important. This CPU is much slower than a 1.6 GHz ARM Cortex which uses less than two watts.

Name: >>130 2012-03-29 22:59

>>129
This measurement would make sense only if the object code was identical on all processors. Otherwise your ``MIPS/MHz'' is saying more about the compiler's optimizations than it is about the CPUs it runs on.

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