22 May 2017
Tags:
C++
The benchmarks comparing transform to a
loop also highlighted the substantial contribution that copying values made to their performance. Copying costs become especially noticeable for complex types, such as standard strings too long to fit in the short string optimization.
more ...
03 May 2017
Tags:
C++
The last post presented the baseline C++ code and its generated machine code. Now it’s time to compare the code generated by the std::transform idiom and see how well it fares.
more ...
02 May 2017
Tags:
C++
In my last post, I promised to consider the machine code generated from the STL idiom equivalent to a basic Python list comprehension. As I proceeded, the project expanded to a broader analysis of the idiom’s performance. I am shocked at how much effort this project took. I have spent much of the last five weeks generating and reading the output from g++ 6.2. So. Many. Alternatives. In this post, I’ll describe my baseline for comparison and the criteria I’ll use. In future posts, I’ll present the results.
more ...
26 Mar 2017
Tags:
C++
In the last post, I described the structure of the basic Python list comprehension
[expression1(var) for var in expression2 if condition(var)]
and lamented that all the straightforward translations to the STL algorithms required two statements, one for the filter and one for the computation.
more ...