python / python/pyperformance

Need benchmark using `__getattribute__`

Open
#315 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1k
Forks
203
Avg merge
1h 20m
Merged PRs (30d)
2

Description

It would be nice if there was a benchmark that exercised __getattribute__ somewhat realistically. Defining that method is the only way to exercise the specialized instruction LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN. Then again, maybe that method is not important enough to have its own specialized opcode?

See also https://github.com/python/cpython/pull/93988#issuecomment-1745806916

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by reviewing the existing benchmark suite and the linked CPython discussion about LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN. Identify where a realistic getattribute benchmark belongs, then add coverage that exercises the specialized instruction and verify it runs with the suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.