tianshou icon indicating copy to clipboard operation
tianshou copied to clipboard

Use '__slots__' to improve performance and memory usage

Open duburcqa opened this issue 4 years ago • 0 comments

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.

duburcqa avatar Sep 02 '20 17:09 duburcqa