Topic: C/C++/C
You are looking at all articles with the topic "C/C++/C". We found 3 matches.
Hint:
To view all topics, click here. Too see the most popular topics, click here instead.
🔗 Duffs Device
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.
Discussed on
- "Duff's Device" | 2020-05-25 | 145 Upvotes 59 Comments
- "Duffs Device" | 2016-10-21 | 19 Upvotes 4 Comments
- "Duff's device: do + switch fall-through = loop unrolling" | 2009-08-13 | 16 Upvotes 11 Comments
🔗 GObject
The GLib Object System, or GObject, is a free software library providing a portable object system and transparent cross-language interoperability. GObject is designed for use both directly in C programs to provide object-oriented C-based APIs and through bindings to other languages to provide transparent cross-language interoperability, e.g. PyGObject.
Discussed on
- "GObject" | 2017-09-02 | 58 Upvotes 42 Comments
🔗 Cairo – Open-Source 2D Graphics Layer/API with font support and many back-ends
Cairo (stylized as cairo) is an open-source graphics library that provides a vector graphics-based, device-independent API for software developers. It provides primitives for two-dimensional drawing across a number of different back ends. Cairo uses hardware acceleration when available.
Discussed on
- "Cairo – Open-Source 2D Graphics Layer/API with font support and many back-ends" | 2023-07-15 | 10 Upvotes 5 Comments