Global Information Lookup Global Information

Loop unrolling information


Loop unrolling, also known as loop unwinding, is a loop transformation technique that attempts to optimize a program's execution speed at the expense of its binary size, which is an approach known as space–time tradeoff. The transformation can be undertaken manually by the programmer or by an optimizing compiler. On modern processors, loop unrolling is often counterproductive, as the increased code size can cause more cache misses; cf. Duff's device.[1]

The goal of loop unwinding is to increase a program's speed by reducing or eliminating instructions that control the loop, such as pointer arithmetic and "end of loop" tests on each iteration;[2] reducing branch penalties; as well as hiding latencies, including the delay in reading data from memory.[3] To eliminate this computational overhead, loops can be re-written as a repeated sequence of similar independent statements.[4]

Loop unrolling is also part of certain formal verification techniques, in particular bounded model checking.[5]

  1. ^ Tso, Ted (August 22, 2000). "Re: [PATCH] Re: Move of input drivers, some word needed from you". lkml.indiana.edu. Linux kernel mailing list. Retrieved August 22, 2014. Jim Gettys has a wonderful explanation of this effect in the X server. It turns out that with branch predictions and the relative speed of CPU vs. memory changing over the past decade, loop unrolling is pretty much pointless. In fact, by eliminating all instances of Duff's Device from the XFree86 4.0 server, the server shrunk in size by _half_ _a_ _megabyte_ (!!!), and was faster to boot, because the elimination of all that excess code meant that the X server wasn't thrashing the cache lines as much.
  2. ^ Ullman, Jeffrey D.; Aho, Alfred V. (1977). Principles of compiler design. Reading, Mass: Addison-Wesley Pub. Co. pp. 471–2. ISBN 0-201-10073-8.
  3. ^ Petersen, W.P., Arbenz, P. (2004). Introduction to Parallel Computing. Oxford University Press. p. 10.{{cite book}}: CS1 maint: multiple names: authors list (link)
  4. ^ Nicolau, Alexandru (1985). "Loop Quantization: Unwinding for Fine-Grain Parallelism Exploitation". Dept. of Computer Science Technical Report. Ithaca, NY: Cornell University. OCLC 14638257. {{cite journal}}: Cite journal requires |journal= (help)
  5. ^ Model Checking Using SMT and Theory of Lists

and 20 Related for: Loop unrolling information

Request time (Page generated in 0.8219 seconds.)

Loop unrolling

Last Update:

Loop unrolling, also known as loop unwinding, is a loop transformation technique that attempts to optimize a program's execution speed at the expense...

Word Count : 3268

Optimizing compiler

Last Update:

with loop reversal. Loop unrolling Unrolling duplicates the body of the loop multiple times, in order to decrease the number of times the loop condition...

Word Count : 5321

Loop interchange

Last Update:

safely interchange loops, dependence analysis is required. Loop splitting Loop skewing Loop fission and fusion Loop unrolling "Loop interchange" (PDF)...

Word Count : 555

Loop optimization

Last Update:

to run as many of the loop iterations as possible at the same time on a SIMD system. Unrolling – duplicates the body of the loop multiple times, in order...

Word Count : 1501

Software pipelining

Last Update:

iterations will be divisible by the number of iterations we unroll. See the article on loop unrolling for more on solutions to this problem, but note that software...

Word Count : 1991

Automatic vectorization

Last Update:

other based on loop unrolling. This technique, used for conventional vector machines, tries to find and exploit SIMD parallelism at the loop level. It consists...

Word Count : 2862

Harvard Mark I

Last Update:

complex programs had to be physically lengthy. A program loop was accomplished by loop unrolling or by joining the end of the paper tape containing the...

Word Count : 2445

Data dependency

Last Update:

performance. Loop transformations: In optimizing loops, compilers need to consider data dependencies to apply transformations like loop unrolling, fusion,...

Word Count : 1129

Polytope model

Last Update:

supporting the polyhedral model Loop nest optimization Loop optimization Loop unrolling Loop tiling "The basic polytope method", tutorial by Martin Griebl containing...

Word Count : 698

Parallel computing

Last Update:

parallelism is a vectorization technique based on loop unrolling and basic block vectorization. It is distinct from loop vectorization algorithms in that it can...

Word Count : 8564

Vbcc

Last Update:

dead code elimination alias analysis loop unrolling induction variable elimination loop-invariant code motion loop reversal Sunitha, K.V.N. (2013). Compiler...

Word Count : 288

Template metaprogramming

Last Update:

optimization. As another, more significant, example of compile-time loop unrolling, template metaprogramming can be used to create length-n vector classes...

Word Count : 3113

Inline expansion

Last Update:

This is a similar issue to other code expanding optimizations such as loop unrolling, which also reduces number of instructions processed, but can decrease...

Word Count : 3376

Branch table

Last Update:

can be used for example by optimizing compilers or JIT compilers in loop unrolling. Dispatch table a branch table by another name used for late binding...

Word Count : 2066

PDF

Last Update:

Distiller). This is done by applying standard compiler techniques like loop unrolling, inlining and removing unused branches, resulting in code that is purely...

Word Count : 9344

Functional programming

Last Update:

overhead. This is achieved thanks to the compiler using loop unrolling, where each iteration of a loop, be it imperative or using iterators, is converted into...

Word Count : 8548

Tom Duff

Last Update:

award in 1997. While working at Lucasfilm, he created Duff's device, a loop unrolling mechanism in C. On August 22, 2006, the United States Patent and Trademark...

Word Count : 690

Intel Fortran Compiler

Last Update:

closely represents the source code. This includes loop interchange, loop fusion, loop unrolling, loop distribution, data prefetch, and more. The Intel...

Word Count : 952

Haxe

Last Update:

and function inlining, tail recursion elimination, constant folding, loop unrolling and dead code elimination (DCE) to optimize the run-time performance...

Word Count : 2358

GraalVM

Last Update:

0.8 OpenJDK 1.8.0_262, 11.0.8 This release introduced a new Partial Loop Unrolling optimization for JIT compilation. Improved the G1GC-like garbage collection...

Word Count : 2180

PDF Search Engine © AllGlobal.net