0

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.

Harman
  • 751
  • 1
  • 9
  • 31

2 Answers2

1

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.

André Anjos
  • 4,641
  • 2
  • 27
  • 34
0

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

lefticus
  • 3,346
  • 2
  • 24
  • 28