The native just-in-time compiler in Python 3.15 can speed up code by as much as 20% or more, although it’s still experimental ...
Please see the Python integration docs for details. Assuming you have a local version of PostHog running, you can run python3 example.py to see the library in action ...