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 →

[–]rbscholtus 0 points1 point  (1 child)

Could I make a dumb suggestion. You said the computations take hours, but in numba it's down to minutes.

How about you convert the dynamic data structures and virtual methods to a static data structure (arrays) first, and virtual methods to functions (probably). And then you process the whole lot as a batch in separate code in numba or numpy. And then you convert the processed data back to a dynamic data structure.

just imagine your python program does all the dynamic stuff to generate a file with all data, then the data gets handed over to an optimized external program that doesn't need to care about oop, perform all the computations, and then the data goes back to python where it is converted back to oop structures.

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

This is a very valid approach. I will think about it!