Expression templates
暂无分享,去创建一个
Expression Templates is a C++ technique for passing expressions as function arguments. The expression can be inlined into the function body, which results in faster and more convenient code than C-style callback functions. This technique can also be used to evaluate vector and matrix expressions in a single pass without temporaries. In preliminary benchmark results, one compiler evaluates vector expressions at 95-99.5% efficiency of handcoded C using this technique (for long vectors). The speed is 2-15 times that of a conventional C++ vector class.
[1] Stanley B. Lippman. C++ gems , 1996 .
[2] Michael J. Vilot,et al. Standard template library , 1996 .
[3] Heinz Rutishauser,et al. Description of Algol 60 , 1967 .