λ vs ≫= code size

2015-02-17

Comparison of 3 different ways for binding functions with parameters in c++. What is of interest here is vast difference (>2x) between lambdas and binds in default (rtti + exceptions) case, and even bigger when both rtti and exceptions are disabled (~3.8x).

See listing for files needed to reproduce this locally. Calling generate.sh will produce every file seen in stats_* directories. All results have been generated using g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2.

Things of note:

For detailed statistics please see stats_gcc directory in listing archive from beggining of the post.