Duff's device
Unusual C programming idiom that manually implements loop unrolling using interleaved control structures
In the C programming language, Duff's device is a way of manually implementing loop unrolling by interleaving two syntactic constructs of C: the do-while loop and a switch statement. Its discovery is credited to Tom Duff in November 1983, when Duff was working for Lucasfilm and used it to speed up a real-time animation program.
Nº Q1264012 ★
Comum · Saberes
Duff's device
Unusual C programming idiom that manually implements loop unrolling using interleaved control structures
In the C programming language, Duff's device is a way of manually implementing loop unrolling by interleaving two syntactic constructs of C: the do-while loop and a switch statement. Its discovery is credited to Tom Duff in November 1983, when Duff was working for Lucasfilm and used it to speed up a real-time animation program.
Na Wikipédia
Texto em inglês Ainda não há artigo no seu idioma: trecho em inglês.
In the C programming language, Duff's device is a way of manually implementing loop unrolling by interleaving two syntactic constructs of C: the do-while loop and a switch statement. Its discovery is credited to Tom Duff in November 1983, when Duff was working for Lucasfilm and used it to speed up a real-time animation program. Loop unrolling attempts to reduce the overhead of conditional branching needed to check whether a loop is done, by executing a batch of loop bodies per iteration. To handle cases where the number of iterations is not divisible by the unrolled-loop increments, a common technique among assembly language programmers is to jump directly into the middle of the unrolled loop body to handle the remainder. Duff implemented this technique in C by using C's case label fall-through feature to jump into the unrolled body.
Texto: Wikipédia em inglês, CC BY-SA 4.0. ·
Cartas próximas
-
D
Duplicate code
Piece of source code that occurs more than once in the same environment
Nº Q1105830 ★
Sem ofertas
-
D
Dc
Cross-platform reverse-Polish calculator program
Nº Q344670 ★
Sem ofertas
-
Turbo C
Linguagem de programação
Nº Q1144729 ★★
Sem ofertas
-
A
Aglomerado Beowulf
Nº Q818610 ★
Sem ofertas
-
Alan Kay
Nº Q92742 ★★★
Sem ofertas
-
I
Instrução (informática)
Nº Q925783 ★★
Sem ofertas