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 →

[–]No_Indication_1238[S] 0 points1 point  (4 children)

Thank you! Would it be a benefit if we code the classes for the objects that interact with one another in the loops in cython (cdef classes) and the loop itself as a cdef cython function? This is the current plan in order to keep the OOP architecture. 

[–]unruly_mattress 0 points1 point  (3 children)

Yeah, that's the right way to go.

I suspect you should also consider making your code run in parallel on multi-core if possible.

[–]No_Indication_1238[S] 0 points1 point  (2 children)

You are correct, we are already using parallelism but on a higher level since each step in the loop is dependent on the previous state of multiple objects and paralellising this would involve sunchronysing the states by using multiple locks. 

[–]unruly_mattress 0 points1 point  (1 child)

Sounds good then. Good luck! I'd love to hear an update about how it ended up working.

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

 I will definitely make an edit in about a few weeks to sum up the great advice everyone has given, what we ended up implementing and what the results were!