Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue35585

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Speedup Enum lookup
Type:Stage:resolved
Components:Library (Lib)Versions:Python 3.8, Python 3.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: ethan.furmanNosy List: asvetlov, ethan.furman
Priority:normalKeywords:patch, patch

Created on2018-12-26 00:26 byasvetlov, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 11318mergedasvetlov,2018-12-26 00:29
PR 11318mergedasvetlov,2018-12-26 00:29
PR 11324mergedmiss-islington,2018-12-26 18:46
Messages (3)
msg332524 -(view)Author: Andrew Svetlov (asvetlov)*(Python committer)Date: 2018-12-26 00:26
Construction enums by-value (e.g. http.HTTPStatus(200)) performs two dict lookups:     if value in cls._value2member_map_:        return cls._value2member_map_[value]Changing the code to just    return cls._value2member_map_[value]with catching KeyError can speedup the fast path a little.
msg332558 -(view)Author: Ethan Furman (ethan.furman)*(Python committer)Date: 2018-12-26 18:45
New changeset34ae04f74dcf4ac97d07c3e82eaf8f619d80cedb by Ethan Furman (Andrew Svetlov) in branch 'master':Speed-up building enums by value, e.g. http.HTTPStatus(200) (#11318)https://github.com/python/cpython/commit/34ae04f74dcf4ac97d07c3e82eaf8f619d80cedb
msg332562 -(view)Author: Andrew Svetlov (asvetlov)*(Python committer)Date: 2018-12-26 20:48
New changeset705b5998035739b1794a862123d3dc6e339a14d0 by Andrew Svetlov (Miss Islington (bot)) in branch '3.7':Speed-up building enums by value, e.g. http.HTTPStatus(200) (GH-11318) (GH-11324)https://github.com/python/cpython/commit/705b5998035739b1794a862123d3dc6e339a14d0
History
DateUserActionArgs
2022-04-11 14:59:09adminsetgithub: 79766
2018-12-26 20:52:32asvetlovsetkeywords:patch,patch
status: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-12-26 20:48:58asvetlovsetmessages: +msg332562
2018-12-26 18:46:02miss-islingtonsetpull_requests: +pull_request10587
2018-12-26 18:45:38ethan.furmansetmessages: +msg332558
2018-12-26 01:23:47rhettingersetkeywords:patch,patch
assignee:ethan.furman

nosy: +ethan.furman
2018-12-26 00:29:57asvetlovsetkeywords: +patch
stage: patch review
pull_requests: +pull_request10569
2018-12-26 00:29:55asvetlovsetkeywords: +patch
stage: (no value)
pull_requests: +pull_request10568
2018-12-26 00:26:24asvetlovcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp