Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Monday November 02 2015, @04:31AM   Printer-friendly
from the next-up:-jump-jiving dept.

The "jump threading" compiler optimization (aka -fthread-jump) turns conditional into unconditional branches on certain paths at the expense of code size. For hardware with branch prediction, speculative execution, and prefetching, this can greatly improve performance. However, there is no scientific publication or documentation at all. The Wikipedia article is very short and incomplete.

The linked article has an illustrated treatment of common code structures and how these optimizations work.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Informative) by pe1rxq on Monday November 02 2015, @09:13AM

    by pe1rxq (844) on Monday November 02 2015, @09:13AM (#257420) Homepage

    If you are bit banging on a CPU which does branch prediction you are probably already doing it wrong.
    Bit banging is a nice trick if you have a deterministic CPU like an avr or pic with no OS to interfer.
    But on just about anything else you should invest in a little bit of circuitry to implement the protocol the proper way.
    I have done my share of real-time programming, but bit-banging on a general purpose CPU is not a typical problem.

    Starting Score:    1  point
    Moderation   +1  
       Informative=1, Total=1
    Extra 'Informative' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 2) by Alfred on Monday November 02 2015, @07:51PM

    by Alfred (4006) on Monday November 02 2015, @07:51PM (#257656) Journal
    I will nit PIC your comment (pun intended). An AVR or a PIC are not deterministic. Even without an OS they have to process interrupts which are unpredictable and disrupt flow and timing. You could make interrupts wait their turn for CPU time but then they aren't interrupts anymore.

    The XMOS line of chips gravis mentions are deterministic. Of course he misses the boat. A deterministic chip is not something you run a word processor or web browser on. it is great for processing audio streams or a constant rate of data with the same function over and over. Gravis also mentions bit banging which XMOS has pretty much built into the hardware.