- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | serhiy.storchaka |
|---|---|
| Recipients | georg.brandl, larry, python-dev, serhiy.storchaka, taleinat |
| Date | 2015-06-07.21:36:24 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1433712984.71.0.630037257612.issue20186@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
|---|
The operator module is rarely used in the stdlib, but if it is used in user code (mainly with map(), reduce() or like) the performance often is important. You can use microbenchmarks like following (operator.add is twice faster than lambda x, y: x + y).
./python -m timeit -s "import operator; a = list(range(10000)); b = a[:]" -- "list(map(operator.add, a, b))" |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2015-06-07 21:36:24 | serhiy.storchaka | set | recipients: + serhiy.storchaka, georg.brandl, taleinat, larry, python-dev |
| 2015-06-07 21:36:24 | serhiy.storchaka | set | messageid: <1433712984.71.0.630037257612.issue20186@psf.upfronthosting.co.za> |
| 2015-06-07 21:36:24 | serhiy.storchaka | link | issue20186 messages |
| 2015-06-07 21:36:24 | serhiy.storchaka | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements
