Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace PyTuple_SetItem() with PyTuple_SET_ITEM() in long_divmod() #80244

Closed
sir-sigurd mannequin opened this issue Feb 21, 2019 · 2 comments
Closed

replace PyTuple_SetItem() with PyTuple_SET_ITEM() in long_divmod() #80244

sir-sigurd mannequin opened this issue Feb 21, 2019 · 2 comments
Labels
3.8 only security fixes performance Performance or resource usage

Comments

@sir-sigurd
Copy link
Mannequin

sir-sigurd mannequin commented Feb 21, 2019

BPO 36063
Nosy @serhiy-storchaka, @sir-sigurd
PRs
  • bpo-36063: Minor performance tweak in long_divmod() #11915
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-02-21.10:01:57.448>
    created_at = <Date 2019-02-21.09:41:35.771>
    labels = ['3.8', 'performance']
    title = 'replace PyTuple_SetItem() with PyTuple_SET_ITEM() in long_divmod()'
    updated_at = <Date 2019-02-21.10:01:57.447>
    user = 'https://github.com/sir-sigurd'

    bugs.python.org fields:

    activity = <Date 2019-02-21.10:01:57.447>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-02-21.10:01:57.448>
    closer = 'serhiy.storchaka'
    components = []
    creation = <Date 2019-02-21.09:41:35.771>
    creator = 'sir-sigurd'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36063
    keywords = ['patch']
    message_count = 2.0
    messages = ['336194', '336196']
    nosy_count = 2.0
    nosy_names = ['serhiy.storchaka', 'sir-sigurd']
    pr_nums = ['11915']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'performance'
    url = 'https://bugs.python.org/issue36063'
    versions = ['Python 3.8']

    @sir-sigurd
    Copy link
    Mannequin Author

    sir-sigurd mannequin commented Feb 21, 2019

    This change produces minor speed-up:

    $ python-other -m perf timeit -s "divmod_ = divmod" "divmod_(1, 1)" --duplicate=1000 --compare-to=../cpython-master/venv/bin/python
    python: ..................... 64.6 ns +- 4.8 ns
    python-other: ..................... 59.4 ns +- 3.2 ns

    Mean +- std dev: [python] 64.6 ns +- 4.8 ns -> [python-other] 59.4 ns +- 3.2 ns: 1.09x faster (-8%)

    @sir-sigurd sir-sigurd mannequin added 3.8 only security fixes performance Performance or resource usage labels Feb 21, 2019
    @serhiy-storchaka
    Copy link
    Member

    New changeset ea6207d by Serhiy Storchaka (Sergey Fedoseev) in branch 'master':
    bpo-36063: Minor performance tweak in long_divmod(). (GH-11915)
    ea6207d

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes performance Performance or resource usage
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant