Duff's device
E900227
Duff's device is a loop-unrolling technique in the C programming language that exploits switch-case fall-through to optimize data copying, famously demonstrating an unusual and clever use of C's control structures.
All labels observed (1)
| Label | Occurrences |
|---|---|
| Duff's device canonical | 3 |
How this entity was disambiguated
This entity first appeared as the object of triple T11016864 — resolving that mention is where its identity was fixed. The disambiguator weighed these candidate entities and picked the highlighted one (or “None”, minting a new entity). This is how homonymy is resolved: the same surface form can point to different entities.
Target entity: Duff's device Context triple: [Tom Duff, knownFor, Duff's device]
-
A.
Marzullo's algorithm
Marzullo's algorithm is a method for selecting the most likely correct time interval from multiple, possibly conflicting time sources, commonly used in clock synchronization systems.
-
B.
M4 macro processor
The M4 macro processor is a general-purpose macro processing language and tool commonly used in Unix-like systems for generating and transforming text, especially in build and configuration workflows.
-
C.
SIMD within a register (SWAR)
SIMD within a register (SWAR) is a technique that exploits standard CPU registers and instructions to perform parallel operations on multiple smaller data elements packed into a single register, enabling data-level parallelism without dedicated vector hardware.
-
D.
Cooley–Tukey Fast Fourier Transform algorithm
The Cooley–Tukey Fast Fourier Transform algorithm is a widely used, efficient method for computing the discrete Fourier transform that revolutionized digital signal processing and numerical analysis.
-
E.
Eiffel programming language
Eiffel is an object-oriented programming language designed by Bertrand Meyer that emphasizes software correctness through features like Design by Contract and strong support for modular, reusable code.
- F. None of above. chosen
- G. Unsure - the case is ambiguous/there is not enough information to decide.
Target entity: Duff's device Target entity description: Duff's device is a loop-unrolling technique in the C programming language that exploits switch-case fall-through to optimize data copying, famously demonstrating an unusual and clever use of C's control structures.
-
A.
Marzullo's algorithm
Marzullo's algorithm is a method for selecting the most likely correct time interval from multiple, possibly conflicting time sources, commonly used in clock synchronization systems.
-
B.
M4 macro processor
The M4 macro processor is a general-purpose macro processing language and tool commonly used in Unix-like systems for generating and transforming text, especially in build and configuration workflows.
-
C.
SIMD within a register (SWAR)
SIMD within a register (SWAR) is a technique that exploits standard CPU registers and instructions to perform parallel operations on multiple smaller data elements packed into a single register, enabling data-level parallelism without dedicated vector hardware.
-
D.
Cooley–Tukey Fast Fourier Transform algorithm
The Cooley–Tukey Fast Fourier Transform algorithm is a widely used, efficient method for computing the discrete Fourier transform that revolutionized digital signal processing and numerical analysis.
-
E.
Eiffel programming language
Eiffel is an object-oriented programming language designed by Bertrand Meyer that emphasizes software correctness through features like Design by Contract and strong support for modular, reusable code.
- F. None of above. chosen
Statements (49)
| Predicate | Object |
|---|---|
| instanceOf |
C programming idiom
ⓘ
code optimization technique ⓘ loop unrolling technique ⓘ |
| author | Tom Duff NERFINISHED ⓘ |
| category |
low-level optimization
ⓘ
systems programming idiom ⓘ |
| creationYear | 1983 ⓘ |
| creator | Tom Duff NERFINISHED ⓘ |
| discussedIn |
The C Programming Language community
NERFINISHED
ⓘ
comp.lang.c newsgroup NERFINISHED ⓘ |
| documentedIn | Tom Duff's original email to the C mailing list NERFINISHED ⓘ |
| exploitsLanguageFeature |
C's relaxed grammar for statement placement
ⓘ
switch-case fall-through ⓘ |
| firstUseContext | Lucasfilm graphics system NERFINISHED ⓘ |
| firstUseDomain | graphics programming GENERATED ⓘ |
| hasStatus | mostly of historical and educational interest ⓘ |
| implementsConcept |
manual loop unrolling
ⓘ
software pipelining style copy ⓘ |
| influenced |
compiler optimization pedagogy
ⓘ
later discussions of C language design ⓘ |
| influencedBy | manual loop unrolling techniques in assembly ⓘ |
| modernRelevance | rarely needed with modern optimizing compilers ⓘ |
| notableProperty |
considered difficult to read
ⓘ
considered error-prone in maintenance ⓘ interleaves switch statement with loop body ⓘ legal but surprising C syntax ⓘ often cited as an example of C's syntactic flexibility ⓘ places case labels inside a loop ⓘ |
| optimizationGoal |
improve performance of memory copy operations
ⓘ
increase instruction-level parallelism ⓘ reduce number of branch instructions ⓘ |
| performanceDependsOn |
compiler optimization level
ⓘ
memory system characteristics ⓘ target CPU architecture ⓘ |
| primaryPurpose |
optimize data copying
ⓘ
reduce loop overhead ⓘ |
| programmingLanguage | C ⓘ |
| relatedConcept |
branch prediction
ⓘ
instruction scheduling ⓘ loop unrolling ⓘ memcpy ⓘ |
| typicalUnrollFactor | 8 GENERATED ⓘ |
| typicalUseCase |
copying arrays of bytes
ⓘ
copying arrays of shorts ⓘ copying arrays of words ⓘ |
| usesControlStructure |
case labels
ⓘ
do-while loop ⓘ fall-through behavior ⓘ switch statement ⓘ |
How these facts were elicited
The pipeline generated the facts above by prompting gpt-5.1 with this entity's name + description and the instruction below.
You are a knowledge base construction expert. Given a subject entity and a description of it, return factual statements that you know for the subject as a JSON list of dictionaries(triples), where keys must be "subject", "predicate" and "object". The number of facts may be very high, between 25 to 50 or more, for very popular subjects. For less popular subjects, the number of facts can be very low, like 5 or 10. # Requirements - If you don't know the subject at all, return an empty list. - If the subject is not a named entity, return an empty list. - Include at least one triple where predicate is "instanceOf". - Do not get too wordy. - Separate several objects into multiple triples with one object.
Subject: Duff's device Description of subject: Duff's device is a loop-unrolling technique in the C programming language that exploits switch-case fall-through to optimize data copying, famously demonstrating an unusual and clever use of C's control structures.
Referenced by (3)
Full triples — surface form annotated when it differs from this entity's canonical label.