Related Experiment Video
Updated: Apr 3, 2026

Tuning Degradation to Achieve Specific and Efficient Protein Depletion
Published on: July 20, 2019
A Case Study of Performance Degradation Attributable to Run-Time Bounds Checks on C++ Vector Access
David Flater1, William F Guthrie1
1National Institute of Standards and Technology, Gaithersburg, MD 20899.
Abstract:
Programmers routinely omit run-time safety checks from applications because they assume that these safety checks would degrade performance. The simplest example is the use of arrays or array-like data structures that do not enforce the constraint that indices must be within bounds. This report documents an attempt to measure the performance penalty incurred by two different implementations of bounds-checking in C and C++ using a simple benchmark and a desktop PC with a modern superscalar CPU. The benchmark consisted of a loop that wrote to array elements in sequential order. With this configuration, relative to the best performance observed for any access method in C or C++, mean degradation of only (0.881 ± 0.009) % was measured for a standard bounds-checking access method in C++. This case study showed the need for further work to develop and refine measurement methods and to perform more comparisons of this type. Comparisons across different use cases, configurations, programming languages, and environments are needed to determine under what circumstances (if any) the performance advantage of unchecked access is actually sufficient to outweigh the negative consequences for security and software quality.
Related Concept Videos
Optimization Problems
Vector Operations
A vector multiplied by a scalar value is called scalar multiplication. The result obtained is a new vector with a different magnitude. If the scalar is positive, the direction of the vector remains the same, but if it is negative, the direction of the vector is reversed. For example, the product of the mass and velocity yields the momentum.
Vectors
Buffers: Buffer Capacity
In the graph, pH is plotted as a function of the number of moles of base (Cb) added to a weak...
Scalar and Vectors
Scalar quantities with the same physical units can be added or subtracted according to the usual algebra rules for numbers. For example, a class ending 10 min earlier than 50 min lasts...
Types of Errors: Detection and Minimization
Absolute error in a measurement is the numerical difference from the true or central value. Relative error is the ratio between absolute error and the true or central value, expressed as a percentage.
Errors can be classified by source, magnitude, and sign. There are three types of errors: systematic, random, and gross.
Systematic or...

