Native, "direct" Python bindings (interface) and misc tools for a custom implementation of OpenDSS (EPRI Distribution System Simulator). Based on CFFI, DSS C-API, aiming for full COM API-level compatibility on Windows, Linux and MacOS, while providing various extensions.
While some properties are faster using NumPy arrays, others that return very small arrays can be faster if they use lists. Many other properties have very similar performance. Some examples follow.
Returning lists in some cases would probably be undesirable since the user would probably convert the list to array anyway, like ActiveCircuit.Lines.Rmatrix. In other cases, like ActiveCircuit.Loads.ZIPV, using lists could be better.
The task is to evaluate properties that would be better when used with lists while not affecting the performance negatively.
While some properties are faster using NumPy arrays, others that return very small arrays can be faster if they use lists. Many other properties have very similar performance. Some examples follow.
Faster with arrays (np.fromstring/np.frombuffer):
Faster with lists (ffi.unpack):
Returning lists in some cases would probably be undesirable since the user would probably convert the list to array anyway, like
ActiveCircuit.Lines.Rmatrix
. In other cases, likeActiveCircuit.Loads.ZIPV
, using lists could be better.The task is to evaluate properties that would be better when used with lists while not affecting the performance negatively.