Title: Popping in lists is slow · Issue #2741 · lcompilers/lpython · GitHub
Open Graph Title: Popping in lists is slow · Issue #2741 · lcompilers/lpython
X Title: Popping in lists is slow · Issue #2741 · lcompilers/lpython
Description: The following code snippet: q: list[i32] = [] i: i32 for i in range(100000): q.append(i) for i in range(100000): q.pop(0) takes >30s on my machine, while the C++ equivalent takes 1.3s. This is due to inefficiencies in the pop function.
Open Graph Description: The following code snippet: q: list[i32] = [] i: i32 for i in range(100000): q.append(i) for i in range(100000): q.pop(0) takes >30s on my machine, while the C++ equivalent takes 1.3s. This is due ...
X Description: The following code snippet: q: list[i32] = [] i: i32 for i in range(100000): q.append(i) for i in range(100000): q.pop(0) takes >30s on my machine, while the C++ equivalent takes 1.3s. This is d...
Opengraph URL: https://github.com/lcompilers/lpython/issues/2741
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Popping in lists is slow","articleBody":"The following code snippet:\r\n```py\r\nq: list[i32] = []\r\ni: i32\r\nfor i in range(100000):\r\n q.append(i)\r\n\r\nfor i in range(100000):\r\n q.pop(0)\r\n``` \r\ntakes \u003e30s on my machine, while the C++ equivalent takes 1.3s. This is due to inefficiencies in the pop function.\r\n","author":{"url":"https://github.com/advikkabra","@type":"Person","name":"advikkabra"},"datePublished":"2024-06-19T18:33:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2741/lpython/issues/2741"}
| 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:bfe473e8-929b-82c3-ee44-5816da0e307a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D4D2:8D103:1D20A03:266664C:696AFD0A |
| html-safe-nonce | c8f15c922b3907ad47b4979c9826860b4561dace6ecbdca589a81d933430092b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEQyOjhEMTAzOjFEMjBBMDM6MjY2NjY0Qzo2OTZBRkQwQSIsInZpc2l0b3JfaWQiOiI3MTkzOTk4OTQ3NTg2MzQyMTU1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1a5f8fd1c6f4b9c375ca52647732db1e968b2124fdcf1753ea2fe07220d82cf1 |
| hovercard-subject-tag | issue:2362944064 |
| 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/lcompilers/lpython/2741/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8ac7f25ceed9e225d3c189098bf84c30491f2c2bbf197beac5dccee6820a15f4/lcompilers/lpython/issues/2741 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8ac7f25ceed9e225d3c189098bf84c30491f2c2bbf197beac5dccee6820a15f4/lcompilers/lpython/issues/2741 |
| og:image:alt | The following code snippet: q: list[i32] = [] i: i32 for i in range(100000): q.append(i) for i in range(100000): q.pop(0) takes >30s on my machine, while the C++ equivalent takes 1.3s. This is due ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | advikkabra |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/lcompilers/lpython git https://github.com/lcompilers/lpython.git |
| octolytics-dimension-user_id | 96538276 |
| octolytics-dimension-user_login | lcompilers |
| octolytics-dimension-repository_id | 442864346 |
| octolytics-dimension-repository_nwo | lcompilers/lpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 442864346 |
| octolytics-dimension-repository_network_root_nwo | lcompilers/lpython |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width