Skip to content

Speed up list comprehensions by preallocating the list where possible #58334

@alex

Description

@alex
BPO 14126
Nosy @rhettinger, @terryjreedy, @vstinner, @pjenvey, @ezio-melotti, @alex, @markshannon, @ammaraskar, @pablogsal
Files
  • preallocate.diff
  • 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 = None
    created_at = <Date 2012-02-25.23:29:26.536>
    labels = ['interpreter-core', 'performance']
    title = 'Speed up list comprehensions by preallocating the list where possible'
    updated_at = <Date 2020-03-09.09:10:58.334>
    user = 'https://github.com/alex'

    bugs.python.org fields:

    activity = <Date 2020-03-09.09:10:58.334>
    actor = 'vstinner'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2012-02-25.23:29:26.536>
    creator = 'alex'
    dependencies = []
    files = ['24642']
    hgrepos = []
    issue_num = 14126
    keywords = ['patch']
    message_count = 11.0
    messages = ['154288', '154799', '154802', '154838', '154842', '154854', '363576', '363586', '363594', '363603', '363707']
    nosy_count = 9.0
    nosy_names = ['rhettinger', 'terry.reedy', 'vstinner', 'pjenvey', 'ezio.melotti', 'alex', 'Mark.Shannon', 'ammar2', 'pablogsal']
    pr_nums = []
    priority = 'low'
    resolution = None
    stage = 'resolved'
    status = 'open'
    superseder = None
    type = 'performance'
    url = 'https://bugs.python.org/issue14126'
    versions = ['Python 3.6']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      interpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usage

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions