Porting GHPython code to C++ DLL

Does anyone know how to run a GHPython script through a C++ dll with the intent of drastically increasing calculation time?

I got the initial idea from a discussion here (300X Speedup by Porting Python code to C++ DLL with ctypes interface - #4 by Terry_Chappell) but it wasn’t very clear if this can be done through GHPython.

I am also attaching my sample GH script here to show the piece of python code that I am trying to port to a C++ DLL. Any leads on this would be much appreciated. Thanks!

Python code to C++ DLL.gh (73.4 KB)

I hope you’re looking to decrease the calculation time :slight_smile:

4 Likes

Check this out:
https://solarianprogrammer.com/2019/07/18/python-using-c-cpp-libraries-ctypes/

1 Like

Most likely it requires you to rewrite all code…

Oops :sweat_smile: yes. That’s what I meant. I think I meant to say *increasing calculation speed :sweat_smile: Thanks for helping me clarify that!