Loop perforation is an approximate computing technique that allows to regularly skip some iterations of a loop.[1][2][3]

It relies on one parameter: the perforation rate. The perforation rate can be interpreted as the number of iteration to skip each time or the number of iterations to perform before skipping one.

Variants of loop perforation include those that skip iterations deterministically at regular intervals, those that skip iterations at the beginning or the end of the loop, and those that skip a random sample of iterations. The compiler may select the perforation variant at the compile-time, or include instrumentation that allows the runtime system to adaptively adjust the perforation strategy and perforation rate to satisfy the end-to-end accuracy goal.

Loop perforation techniques were first developed by MIT professor Martin C. Rinard and researchers in his group, Henry Hoffmann, Sasa Misailovic, and Stelios Sidiroglou.

Code examples

edit

The examples that follows provide the result of loop perforation applied on this C-like source code

for (int i = 0; i < N; i++) {
    // do things
}

Skip n iterations each time

edit
for (int i = 0; i < N; i++) {
    // do things
    i = i + skip_factor;
}

Skip one iteration after n

edit
int count = 0;

for (int i = 0; i < N; i++) {
    if (count == skip_factor) {
        count = 0;
    } else {
        // do things
        count++;
    }
}

See also

edit
  1. ^ Henry Hoffmann, Sasa Misailovic, Stelios Sidiroglou, Anant Agarwal, Martin Rinard "Using Code Perforation to Improve Performance, Reduce Energy Consumption, and Respond to Failures" MIT CSAIL Tech. Report 2009-042, September 2009
  2. ^ Sasa Misailovic, Stelios Sidiroglou, Henry Hoffmann, Martin C. Rinard "Quality of Service Profiling" 32nd International Conference on Software Engineering (ICSE 2010). May 2010.
  3. ^ Steilos Sidiroglou, Sasa Misailovic, Henry Hoffmann, and Martin Rinard. "Managing Performance vs. Accuracy Trade-offs With Loop Perforation." ESEC/FSE. September, 2011


📚 Artikel Terkait di Wikipedia

Gastrointestinal perforation

eventually perforation. Eating multiple magnets can also lead to perforation if the magnets attract and stick to one another through different loops of the

Peritonitis

include shock and acute respiratory distress syndrome. Causes include perforation of the intestinal tract, pancreatitis, pelvic inflammatory disease, stomach

Esophageal rupture

esophageal perforations, usually due to medical instrumentation such as an endoscopy or paraesophageal surgery. The 10% of esophageal perforations caused

35 mm movie film

exposure length on 35 mm for movies ("single-frame" format) is four perforations per frame along both edges, which results in 16 frames per foot of film

Task skipping

{ value_1 = compute_1(i); if (value_1 >= fixed_threshold) { value_2 = compute_2(i); } } Loop perforation Memoization Computer programming portal v t e

Approximate computing

fuzzy caching) can be applied. Some iterations of loops can be skipped (termed as loop perforation) to achieve a result faster. Some tasks can also be

Intrauterine device

serious complications such as uterine perforation and, in rare cases, bladder perforation. Bladder perforation, while uncommon (affecting only 2% of migrated

Coffee bean sign

carries risks, including perforation or worsening of the obstruction, and should be avoided in cases where bowel ischemia or perforation is suspected. On abdominal