Binding Software

211 Views Asked by At

Is there a software for Language Bindings, other than SWIG. Also which is the most efficient ? I am looking for efficiency for C++ to Python bindings.

2

There are 2 best solutions below

0
On BEST ANSWER

There are 6 (main) alternatives when it comes to binding C++ and Python:

  1. SWIG - as you already know
  2. Boost.Python - that was the advice of lefticus
  3. Cython - very neat syntax close to Python
  4. SIP - not very much spread, but it is there
  5. PyBindGen - claims to be the fastest
  6. ECS:Python - new stuff

In terms of efficiency, I guess that will depend on what the task is. If you browse a bit around the net, you will see benchmarks around. PyBindGen folks are actually very proud of their system. You may want to start having a look there.

Particularly, I have experience with Boost.Python - easy to learn the simple tasks, a bit more tricky to do the complicated stuff. Normally generates code which is not the fastest from a function call overhead perspective, but it works beautifully. This one is very mature.

0
On

I cannot speak to efficiency, but the only other C++ to Python binding tool I am aware of is boost::python.