Measuring the Overhead of C++ Standard Template Library Safe Variants

被引:5
|
作者
Pataki, Norbert [1 ]
Szugyi, Zalan [1 ]
Devai, Gergely [1 ]
机构
[1] Eotvos Lorand Univ, Dept Programming Languages & Compilers, Budapest, Hungary
关键词
C++ STL; iterator adaptor; container;
D O I
10.1016/j.entcs.2011.06.005
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
The C++ Standard Template Library is a widely-used library that is based on the generic programming paradigm. The usage of this library does not warrant bug-free programs. Furthermore, many new errors may arise from the inaccurate use of the generic programming paradigm, like dereferencing invalid iterators or misunderstanding remove-like algorithms. Most of the STL algorithms have preconditions which are checked neither at compilation time nor at runtime. Violation of such a precondition results in undefined behaviour. In this paper we propose solutions for a subset of these problems. The techniques we describe help programmers use generic algorithms on sorted intervals in a safer way. We present a new iterator adaptor type and tag as well as safe containers which keep track their iterators' validness. We measure the runtime overhead of these extensions.
引用
收藏
页码:71 / 83
页数:13
相关论文
共 50 条
  • [1] Runtime Concepts for the C++ Standard Template Library
    Pirkelbauer, Peter
    Parent, Sean
    Marcus, Mat
    Stroustrup, Bjarne
    [J]. APPLIED COMPUTING 2008, VOLS 1-3, 2008, : 171 - +
  • [2] PSTL - A C++ Persistent Standard Template Library
    Gschwind, T
    [J]. 6TH USENIX CONFERENCE OF OBJECT-ORIENTED TECHNOLOGIES AND SYSTEMS (COOTS 01), 2001, : 147 - 158
  • [3] C++ toolbox - An overview of the Standard Template Library
    Wise, GB
    [J]. ACM SIGPLAN NOTICES, 1996, 31 (04) : 4 - 10
  • [4] C++ Standard Template Library by infinite iterators
    Kozsik, Tamas
    Pataki, Norbert
    Szugyi, Zalan
    [J]. ANNALES MATHEMATICAE ET INFORMATICAE, 2011, 38 : 75 - 86
  • [5] Multicore C++ Standard Template Library in a Generative Way
    Szugyi, Zalan
    Torok, Mark
    Pataki, Norbert
    [J]. ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2011, 279 (03) : 63 - 72
  • [6] Clang matchers for verified usage of the C++ Standard Template Library
    Horvath, Gabor
    Pataki, Norbert
    [J]. ANNALES MATHEMATICAE ET INFORMATICAE, 2015, 44 : 99 - 109
  • [7] Dense and Sparse Matrix Classes Using the C++ Standard Template Library
    Søren S. Nielsen
    [J]. Computational Economics, 1999, 14 (1-2) : 47 - 68
  • [8] Template numerical toolkit for linear algebra: High performance programming with C++ and the standard template library
    Pozo, R
    [J]. INTERNATIONAL JOURNAL OF SUPERCOMPUTER APPLICATIONS AND HIGH PERFORMANCE COMPUTING, 1997, 11 (03): : 251 - 263
  • [9] Standard C/C++: Testing C++ library conformance
    Plauger, P.J.
    [J]. C/C++ Users Journal, 2000, 18 (04):
  • [10] Standard C++ library redux
    不详
    [J]. IEEE SPECTRUM, 1996, 33 (05) : 81 - 82