BookRags.com Literature Guides Literature
Guides
Criticism & Essays Criticism &
Essays
Questions & Answers Questions &
Answers
Lesson Plans Lesson
Plans
My Bibliography Periodic Table U.S. Presidents Shakespeare Sonnet Shake-Up
Research Anything:        
History | Encyclopedias | Films | News | Create a Bibliography | More... Login | Register | Help
Not What You Meant?  There are 49 definitions for Fusion.

Loop fusion

Print-Friendly
About 1 pages (142 words)

Bookmark and Share Know this topic well? Help others and get FREE products!

Loop fusion, also called loop jamming, is a compiler optimization, a loop transformation, which replaces multiple loops with a single one.

Example in C

 int i, a[100], b[100];
 for (i = 0; i < 100; i++) {
   a[i] = 1;                     
 }
 for (i = 0; i < 100; i++) {
   b[i] = 2;
 }

is equivalent to:

 int i, a[100], b[100];
 for (i = 0; i < 100; i++) {
   a[i] = 1; 
   b[i] = 2;
 }

Note

Some optimizations like this don't always improve the run-time performance. This is due to architectures that provide better performance if there are two loops rather than one, for example due to increased data locality within each loop. In those cases, a single loop may be transformed into two, which is called loop fission.

External links

View More Summaries on Loop fusion
 
Ask any question on Loop fusion and get it answered FAST!
Answer questions in BookRags Q&A and earn points toward
discounted or even FREE Study Guides and other BookRags products!
Learn more about BookRags Q&A
Copyrights
Loop fusion from Wíkipedia. ©2006 by Wíkipedia. Licensed under the GNU Free Documentation License. View a list of authors or edit this article.

Article Navigation
Join BookRagslearn moreJoin BookRags




About BookRags | Customer Service | Report an Error | Terms of Use | Privacy Policy