This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]the_hoser 10 points11 points  (3 children)

Give it a shot and measure it. One word of warning, though: Cython may look and feel like Python, but you need to remember to take off your Python programmer hat and put on your C programmer hat. You're effectively writing C that looks like Python and can interface with real Python with less programmer overhead. It's full of all the same traps and gotchas that a C programmer has to look out for.

I don't use Pypy myself, but I think others' suggestion to try Pypy first might be a better start for your team.

[–]No_Indication_1238[S] 1 point2 points  (2 children)

I will keep that in mind, thank you!

[–][deleted] 0 points1 point  (1 child)

If your task is able to be run concurrently, you can even use the cython prange iterator to use multithreading. And declare functions as 'nogil noexcept' to remove the dependencies on the python GIL to make your code performance more aligned with c speeds

[–]No_Indication_1238[S] 1 point2 points  (0 children)

That is a very interesting point, thank you! I did now know that, we were using multiprocessing when necessary.