Is implementing an array class using ctypes more efficient than using lists? Implementation
As Ctypes are deterministic, you'll definitely meet some improvements. But I think more than that, it highly depends on your application. What do you want to do with the List?
For example, if you are performing a simple search, then python's own functions and libraries will probably suffice (as they are written in C/C++).
For matrices and algebra-related types of work, you are better off using NumPy as it is highly efficient (comparable to C++ libraries such as Eigen). Any other calculation-related work, implementing it with Ctype will definitely bring you some performance.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments