Re: RFC: Python minimization in Fedora

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 18, 2020 at 03:35:29PM -0500, James Cassell wrote:
> 
> On Thu, Jan 16, 2020, at 5:16 AM, Zbigniew Jędrzejewski-Szmek wrote:
> > 
> > A quick benchmark:
> > $ time python3 -c 'import importlib as i, pydoc_data.topics as t; 
> > [i.reload(t) for _ in range(10000)]'
> > python3 -c   4.16s user 0.45s system 99% cpu 4.646 total
> [...]
> > sudo rm /usr/lib64/python3.7/pydoc_data/__pycache__/topics.cpython-37.*
> > 
> > $ time python3 -c 'import importlib as i, pydoc_data.topics as t; 
> > [i.reload(t) for _ in range(1000)]'
> > python3 -c   13.73s user 0.46s system 96% cpu 14.728 total
> [...]
> > But the effect of having *some* .pyc file is not. For this file (which
> > is 600+kb), the difference is 147.28/4.646 ≈ 30 times. So we clearly
> > need to keep the possibility of installing .pyc files, at least optionally.
> > 
> 
> Thanks for doing these benchmarks! I think you misplaced a decimal in the analysis, though; it's closer to 3 times performance difference, not 30 times.  (Unless I missed something.)

The number of loops is different (10k vs 1k), so the ratio I posted is
correct.

Zbyszek
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux