tianshou
tianshou copied to clipboard
Use '__slots__' to improve performance and memory usage
I think many classes of Tianshou, and especially __slots__
seem to be especially appropriate for the use of __slots__
instead of __dict__
. Have a look at this stackoverflow post for more information. It should dramatically reduce memory usage, and reduce the access time for attributes.