Skip to content

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

Closed

Description

@neonene

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:

Linked PRs

Activity

  1. added a commit that references this issue on Sep 28, 2024
  2. picnixz commented on Sep 28, 2024

    @picnixz
    Member

    Closing since completed in dc12237.

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 dirtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions