Hi,

I became curious about this myself and ran a simple benchmark for automatically 
generated binding code of increasing size.

The compilation times for Boost.Python and pybind11 turn out to be fairly 
similar. However, there is a significant difference in terms of the size of the 
compilation result, which is almost twice as large for Boost.Python.

See the details here: http://pybind11.readthedocs.org/en/latest/benchmark.html 
<http://pybind11.readthedocs.org/en/latest/benchmark.html>

Best,
Wenzel

> On Oct 19, 2015, at 9:58 PM, Francesco Biscani <bluesca...@gmail.com> wrote:
> 
> This looks really neat!
> 
> Do you have any measure on the memory/cpu performance wrt Boost.Python when 
> compiling large bindings? I would expect that variadic templates and all the 
> other C++11 goodies are more efficient than the preprocessor magic used in 
> Boost Python, from this point of view.
> 
> Cheers,
> 
>   Francesco.
> 
> On 18 October 2015 at 14:56, Wenzel Jakob <wen...@inf.ethz.ch 
> <mailto:wen...@inf.ethz.ch>> wrote:
> Hello all,
> 
> after being a long-time Boost.Python user, I’ve been working on an 
> alternative that makes more effective use of recent C++11-capable compilers. 
> The overall syntax and ideology are very similar to Boost.Python, but the 
> implementation only requires a few header files with a a vastly smaller 
> amount of code thanks to C++11 lambda functions, tuples and variadic 
> templates. There is also dedicated support for Python’s buffer protocol and 
> NumPy arrays, which is useful for scientific computing applications.
> 
> So far it’s only used by a few projects, but I think it could be useful to 
> this audience.
> 
> Code: https://github.com/wjakob/pybind11 <https://github.com/wjakob/pybind11>
> Documentation: http://pybind11.readthedocs.org/en/latest/ 
> <http://pybind11.readthedocs.org/en/latest/>
> 
> Best,
> Wenzel
> 
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org <mailto:Cplusplus-sig@python.org>
> https://mail.python.org/mailman/listinfo/cplusplus-sig 
> <https://mail.python.org/mailman/listinfo/cplusplus-sig>
> 
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig@python.org
> https://mail.python.org/mailman/listinfo/cplusplus-sig

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
https://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to