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 — C implementation of parts of copy.deepcopy · Issue #72793 · python/cpython

C implementation of parts of copy.deepcopy #72793

New issue
Copy link
New issue
Copy link
Open
Open
C implementation of parts of copy.deepcopy#72793
Copy link
Labels
3.12only security fixesonly security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirperformancePerformance or resource usagePerformance or resource usage

Description

villemoes
mannequin
opened on Nov 3, 2016
Issue body actions
BPO 28607
Nosy @Villemoes, @pablogsal
Files
  • deepcopy.patch
  • deepcopy.patch: patch v2
  • 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 2016-11-03.23:11:36.119>
    labels = ['extension-modules', '3.7', 'performance']
    title = 'C implementation of parts of copy.deepcopy'
    updated_at = <Date 2019-01-20.21:43:41.055>
    user = 'https://github.com/villemoes'

    bugs.python.org fields:

    activity = <Date 2019-01-20.21:43:41.055>
    actor = 'pablogsal'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Extension Modules']
    creation = <Date 2016-11-03.23:11:36.119>
    creator = 'villemoes'
    dependencies = []
    files = ['45344', '45400']
    hgrepos = []
    issue_num = 28607
    keywords = ['patch']
    message_count = 3.0
    messages = ['280032', '280360', '334105']
    nosy_count = 2.0
    nosy_names = ['villemoes', 'pablogsal']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'test needed'
    status = 'open'
    superseder = None
    type = 'performance'
    url = 'https://bugs.python.org/issue28607'
    versions = ['Python 3.7']

    • PR: gh-72793: C implementation of parts of copy.deepcopy #91610

    Activity

    1. villemoes commented on Nov 3, 2016

      @villemoes
      villemoesmannequin
      on Nov 3, 2016
      MannequinAuthor
      More actions

      This is mostly an RFC patch. It compiles and passes the test suite. A somewhat silly microbenchmark such as

      ./python -m timeit -s 'import copy; x = dict([(str(x), x) for x in range(10000)]);' 'copy.deepcopy(x)'

      runs about 30x faster. In the (2.7 only) application which motivated this, the part of its initialization that does a lot of deepcopying drops from 11s to 3s. That it's so much less is presumably because the application holds on to the deepcopies, so there's much more allocation going on than in the microbenchmark, but I haven't investigated thoroughly. In any case, a 3.5x speedup is also nice.

    2. villemoes
      added
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      3.7 (EOL)end of lifeend of life
      performancePerformance or resource usagePerformance or resource usage
      on Nov 3, 2016
    3. brettcannon
      added
      extension-modulesC modules in the Modules dirC modules in the Modules dir
      and removed
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      on Nov 3, 2016
    4. villemoes commented on Nov 8, 2016

      @villemoes
      villemoesmannequin
      on Nov 8, 2016
      MannequinAuthor
      More actions

      New version, addressing (hopefully) all review comments.

    5. pablogsal commented on Jan 20, 2019

      @pablogsal
      pablogsal
      on Jan 20, 2019
      Member
      More actions

      Hy Rasmus,

      would you like to make a PR with your patch and adding some tests?

      Thanks!

    6. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    7. peendebak commented on Apr 21, 2022

      @peendebak
      peendebak
      on Apr 21, 2022
      Contributor
      More actions

      @pablogsal The issue has been stale for a long time, but I created a PR and provided benchmarks.

      The functionality of deepcopy has not changed, so I am not sure whether more tests are required. If so, can you let me know which specific tests you had in mind?

    8. serhiy-storchaka
      added this to Pickle and copy issues 🥒on May 20, 2022
    9. iritkatriel
      added
      3.12only security fixesonly security fixes
      and removed
      3.7 (EOL)end of lifeend of life
      on Sep 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.12only security fixesonly security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirperformancePerformance or resource usagePerformance or resource usage

      Projects

      • Pickle and copy issues 🥒
        Status
        No status
        Show more project fields

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.