Antoine Pitrou <pit...@free.fr> added the comment: Here is a simple script creating 10000 classes (a large number, but perhaps not out of sight for a large application importing a lot of libraries (*)).
(*) see the experiment I did in https://mail.python.org/pipermail/python-dev/2017-December/151260.html Before: $ ./python-orig -I benchgcclasses.py GC time: 6.8 ms RSS: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND antoine 11248 0.0 0.3 41296 24576 pts/1 S+ 12:18 0:00 ./python-orig -I benchgcclasses.py After: $ ./python -I benchgcclasses.py GC time: 6.9 ms RSS: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND antoine 11097 0.0 0.3 41300 24740 pts/1 S+ 12:18 0:00 ./python -I benchgcclasses.py RSS is a bit unstable from run to run, but roughly the patch seems to add 100 to 200KB in this case. As for full GC time, it is quite stable and there's a 0.1ms increase with the patch. Note this is really a worst-case benchmark: lots of classes, no methods, no user data beside the classes. ---------- Added file: https://bugs.python.org/file47378/benchgcclasses.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32346> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com