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 — _decimal: Store a module state in objects for faster access · Issue #124688 · python/cpython

_decimal: Store a module state in objects for faster access #124688

New issue
Copy link
New issue
Copy link
Closed
Closed
_decimal: Store a module state in objects for faster access#124688
Copy link
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-featureA feature request or enhancementA feature request or enhancement

Description

@neonene
neonene
opened on Sep 27, 2024
Issue body actions

Feature or enhancement

Proposal:

It is known to be efficient to get a module state from an object directly rather than from a type. The same can go for the _decimal's context object (i.e. extending the PyDecContextObject struct).

Extending PyDecObject, which made no perf difference for me, seems to be a waste of memory with many objects.

cc @vstinner @erlend-aasland @mdboom

Links to previous discussion of this feature:

  • PyType_GetModuleByDef is really slow. #119663

Linked PRs

  • gh-124688: _decimal: Get a module state from ctx objects for performance #124691

Activity

  1. neonene
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Sep 27, 2024
  2. vstinner
    added a commit that references this issue on Sep 28, 2024

    gh-124688: _decimal: Get module state from ctx for performance (#124691)

    dc12237
  3. picnixz
    added
    extension-modulesC modules in the Modules dirC modules in the Modules dir
    on Sep 28, 2024
  4. picnixz commented on Sep 28, 2024

    @picnixz
    picnixz
    on Sep 28, 2024
    Member
    More actions

    Closing since completed in dc12237.

  5. picnixz
    closed this as completedon Sep 28, 2024
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

    extension-modulesC modules in the Modules dirC modules in the Modules dirtype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      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.