Assessesing the efficiency of various data structures in Python.
The script introduces several ways to represent 3D points, utilizing both built-in structures
like namedtuples, dataclasses (both with and without slots), standard classes, enums,
and dictionaries, as well as custom structures like TensorDict
and TensorClass
.
For TensorDict
and TensorClass
, certain tests separate the object creation from the timed segments.
Each data structure undergoes evaluation through functions made to access the coordinates within a loop.