Misplaced Pages

Task skipping

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
This article provides insufficient context for those unfamiliar with the subject. Please help improve the article by providing more context for the reader. (November 2016) (Learn how and when to remove this message)
This article relies largely or entirely on a single source. Relevant discussion may be found on the talk page. Please help improve this article by introducing citations to additional sources.
Find sources: "Task skipping" – news · newspapers · books · scholar · JSTOR (November 2016)
(Learn how and when to remove this message)

Task skipping is an approximate computing technique that allows to skip code blocks according to a specific boolean condition to be checked at run-time.

This technique is usually applied on the most computational-intensive section of the code.

It relies on the fact that a tuple of values sequentially computed are going to be useful only if the whole tuple meet certain conditions. Knowing that a value of the tuple invalides or probably will invalidate the whole tuple, it is possible to avoid the computation of the rest of the tuple.

Code example

The example that follows provides the result of task skipping applied on this C-like source code

for (int i = 0; i < N; i++) {
    value_1 = compute_1(i);
    value_2 = compute_2(i);
}

Skipping a task

for (int i = 0; i < N; i++) {
    value_1 = compute_1(i);
    if (value_1 >= fixed_threshold) {
        value_2 = compute_2(i);
    }
}

See also


Stub icon

This computing article is a stub. You can help Misplaced Pages by expanding it.

Categories: