sandialabs / pyGSTi

A python implementation of Gate Set Tomography
http://www.pygsti.info
Apache License 2.0
134 stars 56 forks source link

Investigate benefits of ``__slots__`` for core classes #449

Open rileyjmurray opened 4 months ago

rileyjmurray commented 4 months ago

During my thesis work I wrote Python code that created millions of objects from a particular lightweight class. I was able to speed up the code significantly by using __slots__ for the class in question. I suggest we investigate the possibility of speeding up some of pyGSTi's core classes with this approach.

(I'm just opening this issue as the ideas occurs to me. I'll come back with specific suggestions later.)