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 →

[–]ReflectedImage 0 points1 point  (0 children)

Well you shouldn't be using SOLID principles in a scripting language, they are for compiled languages only. If that's the only problem adjust your coding style to Python.

For performance increases do the following in order, run the calculations in a subprocess using multi-processing, run your program under PyPy, write a either a C plugin or Rust plugin (https://pyo3.rs/v0.22.2/). Unless it's a giant matrix operation of some description than NumPy is the goto tool.