Message318321
Here is a micro-benchmark of GC overhead:
* before:
$ ./python -m timeit -s "import gc, doctest, ftplib, asyncio, email, http.client, pydoc, pdb, fractions, decimal, difflib, textwrap, statistics, shutil, shelve, lzma, concurrent.futures, telnetlib, smtpd, tkinter.tix, trace, distutils, pkgutil, tabnanny, pickletools, dis, argparse" "gc.collect()"
100 loops, best of 5: 2.41 msec per loop
* after:
$ ./python -m timeit -s "import gc, doctest, ftplib, asyncio, email, http.client, pydoc, pdb, fractions, decimal, difflib, textwrap, statistics, shutil, shelve, lzma, concurrent.futures, telnetlib, smtpd, tkinter.tix, trace, distutils, pkgutil, tabnanny, pickletools, dis, argparse" "gc.collect()"
100 loops, best of 5: 2.52 msec per loop
So it's a 4% slowdown, but GC runs themselves are a minor fraction of usual programs' runtime, so I'm not sure that matters. Though it would be better to test on an actual GC-heavy application. |
|
Date |
User |
Action |
Args |
2018-05-31 14:50:39 | pitrou | set | recipients:
+ pitrou, vstinner, methane, serhiy.storchaka, yselivanov, eitan.adler |
2018-05-31 14:50:39 | pitrou | set | messageid: <1527778239.14.0.682650639539.issue33597@psf.upfronthosting.co.za> |
2018-05-31 14:50:39 | pitrou | link | issue33597 messages |
2018-05-31 14:50:39 | pitrou | create | |
|