Need benchmark using `__getattribute__`

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

Nobody has claimed this yet.

Assessment

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

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.

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

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

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.

More from python/pyperformance

All issues in python/pyperformance

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.