home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / arch / 12214 < prev    next >
Encoding:
Text File  |  1993-01-11  |  2.1 KB  |  48 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!munnari.oz.au!spool.mu.edu!yale.edu!jvnc.net!newsserver.jvnc.net!newsserver.technet.sg!ntuix!ntrc25.ntrc.ntu.ac.sg!othman
  3. From: othman@ntrc25.ntrc.ntu.ac.sg (othman (EEE/Div 4))
  4. Subject: branch prediction vs loop
  5. Message-ID: <1993Jan11.051511.2428@ntuix.ntu.ac.sg>
  6. Sender: news@ntuix.ntu.ac.sg (USENET News System)
  7. Nntp-Posting-Host: ntrc25.ntrc.ntu.ac.sg
  8. Organization: Nanyang Technological University - Singapore
  9. X-Newsreader: TIN [version 1.1 PL6]
  10. Date: Mon, 11 Jan 1993 05:15:11 GMT
  11. Lines: 35
  12.  
  13.  
  14. branch prediction usually works if we know where we are going to branch to.
  15. About 80%(?) of predictable branches occur in loops, so why don't we just
  16. implement loops?
  17.  
  18. The major problems with loops is the provision for compiler support but
  19. the most common branch prediction technique( prediction bits) also need
  20. compiler support.
  21.  
  22. We can remove any need for loops if we use loop-unrolling but we can also
  23. remove any need for branch prediction if we do branch-rolling, the trade-off
  24. being more code to be stored. So both techniques are just ways of reducing
  25. code size without making any significant processing power improvement.
  26.  
  27. I'm more in favour of using loops because they are easier to implement in
  28. hardware and very useful for my target application-signal processing.
  29.  
  30. Brach cache will be able to handle the more unpredictable (the 20% conditional
  31. branch cases) but it will incur more hardware support. The advantage is that it
  32. can handle more branch cases but is it worth the trouble? Shouldn't loops be
  33. sufficient?
  34.     Can we adopt the loop technique(special case jump hardware) for the
  35. other cases? We can do that if we can identify the special branch cases.
  36.  
  37. Once the conditional branches become more frequent(80%) as the case for 
  38. super-intelligent software, should we abandon pipelining altogether?
  39. After all the branch-prediction techniques are designed to reduce pipeline
  40. flush penalty. 
  41.  
  42. --
  43. Othman bin Ahmad, School of EEE,
  44. Nanyang Technological University, Singapore 2263.
  45. Internet Email: eoahmad@ntuix.ntu.ac.sg
  46. Bitnet Email: eoahmad@ntuvax.bitnet
  47.  
  48.