Title: Restore (or beat) Python 2 performance for arithmetic operations on ints that fit into a single word · Issue #101291 · python/cpython · GitHub
Open Graph Title: Restore (or beat) Python 2 performance for arithmetic operations on ints that fit into a single word · Issue #101291 · python/cpython
X Title: Restore (or beat) Python 2 performance for arithmetic operations on ints that fit into a single word · Issue #101291 · python/cpython
Description: In Python 2 ints and longs were different objects, and the design of each was tailored to the different size and use cases. In Python3 we dropped the distinction, but we also dropped the design for ints that fit into a single word. We ha...
Open Graph Description: In Python 2 ints and longs were different objects, and the design of each was tailored to the different size and use cases. In Python3 we dropped the distinction, but we also dropped the design for...
X Description: In Python 2 ints and longs were different objects, and the design of each was tailored to the different size and use cases. In Python3 we dropped the distinction, but we also dropped the design for...
Opengraph URL: https://github.com/python/cpython/issues/101291
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Restore (or beat) Python 2 performance for arithmetic operations on ints that fit into a single word","articleBody":"\r\nIn Python 2 `int`s and `long`s were different objects, and the design of each was tailored to the different size and use cases.\r\nIn Python3 we dropped the distinction, but we also dropped the design for `int`s that fit into a single word.\r\nWe have added various fast paths for \"medium\" integers (e.g. https://github.com/python/cpython/issues/89109) but the underlying data structure gets in the way.\r\n\r\nWe should layout the int/long object so that it supports fast operations for most integers.\r\n\r\nSee https://github.com/faster-cpython/ideas/issues/548 for a fuller discussion\r\n\r\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-101292\n* gh-101685\n* gh-102464\n* gh-104742\n* gh-104759\n* gh-107388\n* gh-107392\n* gh-125384\n* gh-125407\n* gh-125408\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/markshannon","@type":"Person","name":"markshannon"},"datePublished":"2023-01-24T17:12:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/101291/cpython/issues/101291"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:28b70166-7536-ce25-3435-7ec18d3f5d8a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BEA4:260922:A29557:D949A3:696991F9 |
| html-safe-nonce | 86ce3832f01071cfce93b6b6e607f098946d67e55b1f7e16748d2a1cb597e83f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUE0OjI2MDkyMjpBMjk1NTc6RDk0OUEzOjY5Njk5MUY5IiwidmlzaXRvcl9pZCI6IjE3NzQ3OTYxMDQ3MDAzNjczNTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2b33f5a29e64cc1cf7ad30a4ad927b3789e04477bb1e2b95566ba8e31b30d889 |
| hovercard-subject-tag | issue:1555356928 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/101291/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9abee4111bab1b24c1a393f25516a74b95000fd4578a896a96782c65274f61e4/python/cpython/issues/101291 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9abee4111bab1b24c1a393f25516a74b95000fd4578a896a96782c65274f61e4/python/cpython/issues/101291 |
| og:image:alt | In Python 2 ints and longs were different objects, and the design of each was tailored to the different size and use cases. In Python3 we dropped the distinction, but we also dropped the design for... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | markshannon |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3542e147982176a7ebaa23dfb559c8af16f721c03ec560c68c56b64a0f35e751 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | af80af7cc9e3de9c336f18b208a600950a3c187c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width