How is it Blender fast if it is written in Python?

I am curious to know how is Blender so fast to use (faster than Unity even) if it is written in Python?

It is not.

I thought it was combined with C++?

Python is primarily for the GUI and scripting. All computationally expensive code is C and C++.

You can see an estimate of how much of the code is in a given language on the Github page.

Screenshot from 2021-12-04 18-14-54

1 Like

AH right mate.

How is the UI fast though at responsiveness?

Perhaps I should have been more specific. Python doesn’t render the UI and so its performance limitations have no impact on responsiveness. The UI is all OpenGL rendered in response to the Python code which is used to arrange it. There’s probably a C interface between the Python and OpenGL calls as well, you’d have to read the source for specifics.

2 Likes