sum() several times slower on Python 3 64-bit

Open
#68,264 48 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
15/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start by reviewing the referenced pylong_freelist.patch and unpack_single_digits.patch, then inspect pull requests #28469 and #28493. Compare the reported Python 3 64-bit sum() performance with the changes under discussion; done means the slowdown is addressed and the relevant performance behavior is verified.

Written by the indexing model from the issue text.

Description

interpreter-core performance type-feature
BPO 24076
Nosy @gvanrossum, @rhettinger, @mdickinson, @scoder, @stevendaprano, @ambv, @serhiy-storchaka, @pablogsal
PRs
  • python/cpython#28469
  • python/cpython#28493
  • Files
  • pylong_freelist.patch
  • unpack_single_digits.patch
  • 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 2021-09-21.11:22:53.873>
    created_at = <Date 2015-04-29.18:36:58.330>
    labels = ['interpreter-core', '3.11', 'performance']
    title = 'sum() several times slower on Python 3 64-bit'
    updated_at = <Date 2021-09-22.10:30:16.952>
    user = 'https://github.com/ambv'
    

    bugs.python.org fields:

    activity = <Date 2021-09-22.10:30:16.952>
    actor = 'pablogsal'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-09-21.11:22:53.873>
    closer = 'scoder'
    components = ['Interpreter Core']
    creation = <Date 2015-04-29.18:36:58.330>
    creator = 'lukasz.langa'
    dependencies = []
    files = ['39245', '47748']
    hgrepos = []
    issue_num = 24076
    keywords = ['patch']
    message_count = 35.0
    messages = ['242238', '242241', '242242', '242243', '242244', '242259', '242260', '242262', '242294', '242300', '242302', '242310', '242357', '242914', '323443', '402136', '402201', '402210', '402281', '402282', '402285', '402286', '402295', '402298', '402302', '402306', '402310', '402313', '402315', '402325', '402326', '402328', '402334', '402410', '402421']
    nosy_count = 8.0
    nosy_names = ['gvanrossum', 'rhettinger', 'mark.dickinson', 'scoder', 'steven.daprano', 'lukasz.langa', 'serhiy.storchaka', 'pablogsal']
    pr_nums = ['28469', '28493']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'performance'
    url = 'https://bugs.python.org/issue24076'
    versions = ['Python 3.11']
    

    Dominant language
    Python
    Stars
    77.2k
    Forks
    36k
    Avg merge
    1d 9h
    Merged PRs (30d)
    558

    Contributor guide

    Open the contributing guide

    First steps

    1. Read the whole issue, then the project's contributing guide.
    2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
    3. Fork the repository and make your change on a branch.
    4. Open a pull request that references the issue number.

    More from python/cpython

    All issues in python/cpython

    Similar issues

    More Python issues

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.