GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-90699: Use module state to access insert str object. by corona10 · Pull Request #91693 · python/cpython

Conversation

@corona10

@corona10 corona10 commented Apr 19, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
import pyperf

runner = pyperf.Runner()
runner.timeit(name="bench bisect",
              stmt="""
bisect.insort(a, 30)
""",
              setup = """

import bisect

class A(list):
    pass

a = A(range(1000))
"""
              )

Mean +- std dev: [main] 1.14 us +- 0.01 us -> [module] 1.06 us +- 0.01 us: 1.07x faster

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@corona10
pythongh-90699: Use module state to access insert str object.
3d400c8
@corona10
corona10 requested a review from erlend-aasland April 19, 2022 09:33
@corona10
corona10 requested a review from rhettinger as a code owner April 19, 2022 09:33
@bedevere-bot bedevere-bot added the awaiting core review label Apr 19, 2022
@corona10 corona10 added the skip news label Apr 19, 2022
@corona10

corona10 commented Apr 19, 2022

Copy link
Copy Markdown
Member Author
Raised RLIMIT_NOFILE: 256 -> 1024
0:00:00 load avg: 5.14 Run tests sequentially
0:00:00 load avg: 5.14 [1/1] test_bisect
beginning 6 repetitions
123456
......

== Tests result: SUCCESS ==

1 test OK.

Total duration: 210 ms
Tests result: SUCCESS
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@corona10
nit
a31c571
@corona10
corona10 force-pushed the gh-90699-bisect-modulestate branch from 9f8ca1d to a31c571 Compare April 19, 2022 09:40
kumaraditya303
kumaraditya303 reviewed Apr 19, 2022
View reviewed changes
Comment thread Modules/_bisectmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

kumaraditya303
kumaraditya303 reviewed Apr 19, 2022
View reviewed changes
Comment thread Modules/_bisectmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

erlend-aasland
erlend-aasland reviewed Apr 19, 2022
View reviewed changes
Comment thread Modules/_bisectmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@corona10
Remove unnecessary Py_VISIT
2f21b9e
@corona10
corona10 force-pushed the gh-90699-bisect-modulestate branch from 9e63803 to 2f21b9e Compare April 19, 2022 12:22
@corona10
corona10 requested a review from erlend-aasland April 19, 2022 12:28
erlend-aasland
erlend-aasland reviewed Apr 19, 2022
View reviewed changes
Comment thread Modules/_bisectmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@corona10
Remove traverse method
4473c3b
@corona10
corona10 requested a review from erlend-aasland April 19, 2022 12:43
erlend-aasland
erlend-aasland approved these changes Apr 19, 2022
View reviewed changes
@corona10
corona10 merged commit 16fc573 into python:main Apr 19, 2022
@bedevere-bot bedevere-bot removed the awaiting core review label Apr 19, 2022
@corona10
corona10 deleted the gh-90699-bisect-modulestate branch April 19, 2022 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kumaraditya303 kumaraditya303 kumaraditya303 left review comments
@erlend-aasland erlend-aasland erlend-aasland approved these changes
@rhettinger rhettinger Awaiting requested review from rhettinger rhettinger is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@corona10 @erlend-aasland @kumaraditya303 @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.