RSS blog page - 1/1 Blog


blog page - 1/1

Mixing pybind11 modules

2019-03-19

My scenario was the following: expose a C++ class in one C++ module exported with pybind11, then create a function in a another C++ module returning a result of this class. The solution for that is described in the following issue Return type that is implemented in another library with another set of python bindings, which links to this part of the documentation Custom type casters. and implemented in this module somewhere in cbenchmark_dot.cpp.

post

Branching

2019-02-04

I wanted to test some facts described in the following blog post: Why is it faster to process a sorted array than an unsorted array?. I ended it writing this notebook Measures branching in C++ from python which compares a couple of implementations of the same computation, a dot product.

post

Cython, Pythran, nuitka, numba

2018-08-05

I discovered than :epkg:`Pythran` was now a possible backend for Cython: Pythran as a Numpy backend. On one benchmark, it increases the speed by 2. I recommend the reading of the following article: Optimizing your code with NumPy, Cython, pythran and numba which instigates the performance brought by the four following tool and gives some hints on how to write efficient code with these tools:

post

Exploration with pybind11 and ExtensionArray

2018-08-03

I tried the version of pybind11 to expose a dummy C++ object WeightedDouble, to implement a couple of operators and to see how it behaves into a dataframe.

post

Call C# from Python

2017-09-17

A couple of questions must be answers to do that.

post


RSS blog page - 1/1 2017-09 (1) 2018-08 (2) 2019-02 (1) 2019-03 (1)