Loop perforation
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
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
for (int i = 0; i < N; i++) {
// do things
i = i + skip_factor;
}
Skip one iteration after n
int count = 0;
for (int i = 0; i < N; i++) {
if (count == skip_factor) {
count = 0;
} else {
// do things
count++;
}
}
See also
- ^ 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
- ^ Sasa Misailovic, Stelios Sidiroglou, Henry Hoffmann, Martin C. Rinard "Quality of Service Profiling" 32nd International Conference on Software Engineering (ICSE 2010). May 2010.
- ^ Steilos Sidiroglou, Sasa Misailovic, Henry Hoffmann, and Martin Rinard. "Managing Performance vs. Accuracy Trade-offs With Loop Perforation." ESEC/FSE. September, 2011
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.