[DiscordArchive] <@283455627538333696> have you tried C-types structures?
[DiscordArchive] <@283455627538333696> have you tried C-types structures?
Archived author: Skarn • Posted: 2018-06-16T07:51:35.536000+00:00
Original source
<@283455627538333696> have you tried C-types structures?
Archived author: Skarn • Posted: 2018-06-16T07:51:43.148000+00:00
Original source
or __slots__ optimization
Archived author: Skarn • Posted: 2018-06-16T07:51:53.360000+00:00
Original source
```py
__slots__
```
Archived author: Skarn • Posted: 2018-06-16T07:52:32.244000+00:00
Original source
Slots do give a lot to RAM usage. They won't contribute to speed much, but RAM usage should be significantly reduced compared to normal classes.
Archived author: Quantam • Posted: 2018-06-16T08:00:12.193000+00:00
Original source
I use NamedTuple for everything. Though I just learned that that's bad for performance.
Archived author: Skarn • Posted: 2018-06-16T08:00:49.846000+00:00
Original source
I don't like namedtuple too much
Archived author: Skarn • Posted: 2018-06-16T08:01:02.568000+00:00
Original source
I think it is the same in terms of performance as slot classes
Archived author: Skarn • Posted: 2018-06-16T08:01:14.702000+00:00
Original source
<@283455627538333696> what about ctypes structs?
Archived author: Quantam • Posted: 2018-06-16T08:01:39.043000+00:00
Original source
At least in CPython those appear to keep their data in Python format normally
Archived author: Skarn • Posted: 2018-06-16T08:02:28.721000+00:00
Original source
I think Cython is your best bet otherwise