A
A
Akson872011-10-31 02:34:31
Python
Akson87, 2011-10-31 02:34:31

How fast is Python + C++?

Interested in the speed of calling Python functions from c and vice versa.
The task is this: some scene is rendered in realtime and some parameters of this scene want to be calculated in python for the sake of convenience (a little math). Therefore, it is the process of calling Python functions that is of interest. Is it microseconds, milliseconds, or tens of milliseconds?
I'm far from a python, so the question may be obvious.
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
evgeny_eJ, 2011-10-31
@evgeny_eJ

Fast enough. I can not say the exact time - I did not measure. We called from python to render the entire scene in C++. 100-200 frames per second is quite normal.
At the same time, all game objects were written in python, plus the processing of their states. Each object had update/render methods that were called from both python and C++.
But I would still advise you to use lua.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question