#21 Py::PythonExtension namespace speedup

closed-accepted
None
5
2009-07-19
2009-05-27
No

Hello!
I would like to submit this patch which improves calling performance of Python methods and back. With new development of PyCXX this can be already not only way to improve performance but still, there are many projects who depend on Py::PythonExtension havily and which would not change that due to too many changes like in our project.

The improvement is: to skip hash_map lookups for methods by name and calling them by function pointer instead directly. This method provides direct calling and would save much time if Python and C++ environments cooperate intensively with each other.

The patch is a robust and fully tested (with time also) version and worked for around 4 months for now on project with around 6000 Python scripts registered to C++ core and being heavily called.

Patch is done over Head Revision 188.

Best regards,
Dmitry.

Discussion

  • Anonymous - 2009-05-27

    SVN patch to improve Py::PythonExtension performance

     
  • Anonymous - 2009-05-27
    • assigned_to: nobody --> barry-scott
     
  • Barry Alan Scott

    Very interesting. I'll review and test.

     
  • Barry Alan Scott

    • status: open --> open-accepted
     
  • Barry Alan Scott

    • status: open-accepted --> closed-accepted
     
  • Barry Alan Scott

    Thanks you for this very nice improvement to PyCXX. I have committed as r192 with some improvements.
    Removed the old invoke methods etc.

     
  • Barry Alan Scott

    Thanks you for this very nice improvement to PyCXX. I have committed as r192 with some improvements.
    Removed the old invoke methods etc.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks