[issue32946] Speed up import from non-packages

2018-03-11 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32946] Speed up import from non-packages

2018-03-11 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 4e2442505c5e9eec396dcef4d2e6bdd2b6f92fc9 by Serhiy Storchaka in 
branch 'master':
bpo-32946: Speed up "from ... import ..." from non-packages. (GH-5873)
https://github.com/python/cpython/commit/4e2442505c5e9eec396dcef4d2e6bdd2b6f92fc9


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32946] Speed up import from non-packages

2018-02-25 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +5646
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32946] Speed up import from non-packages

2018-02-25 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

The proposed PR optimizes "from ... import ..." from non-package modules.

$ ./python -m perf timeit 'from locale import getlocale'
Unpatched:  Mean +- std dev: 811 ns +- 27 ns
Patched:Mean +- std dev: 624 ns +- 17 ns

Currently _bootstrap._handle_fromlist() is called which does nothing if the 
module is not a package, but adds an overhead of calling a Python function. The 
PR moves this check out of _handle_fromlist and avoid calling it if not needed.

--
components: Interpreter Core
messages: 312781
nosy: brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Speed up import from non-packages
type: performance
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com