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.)

V/r,
James Cassell
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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@lists.fedoraproject.org

Reply via email to