Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I did something similar for a batch log processing system I wrote in Python some time ago. All the log messages could be classified as representing one of a few dozen 'packet' types, each represented by an object instance (so I could do some additional processing later), so predefining each type's fixed sets of fields using slots noticeably decreased memory usage. Of course, it was the first time I had ever done anything like that in Python, so I may have been doing it wrong...

Anyways, definitely a good short read, thanks for posting!



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: