pydata / pydata/xarray

Improve indexing performance benchmarks

Open
#3,382 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

topic-performance
Dominant language
Python
Stars
4.2k
Forks
1.4k
Avg merge
2d 15h
Merged PRs (30d)
14

Description

As discussed in #3375 - FYI @jhamman

asv_bench/benchmarks/indexing.py is currently missing some key use cases:

  • All tests in the above module use arrays with 2~6 million points.
    While this is important to spot any case where the numpy underlying functions start being unnecessarily called more than once, it also means any performance improvement or degradation in any of the pure-Python code will be completely drowned out.
    All tests should be run twice, once with the current nx = 3000; ny = 2000; nt = 1000 and again with nx = 15; ny = 10; nt = 5.
  • DataArray slicing (sel, isel, and square brackets)
  • Slicing when there are no IndexVariables (verify that we're not creating dummy variables, doing a full scan on them, and then discarding them)
  • other?

Contributor guide

Open the contributing guide

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 with asv_bench/benchmarks/indexing.py and inspect the existing cases and their nx, ny, and nt sizes. Run the current indexing benchmarks, then cover both large and small arrays, DataArray sel/isel/bracket slicing, and slicing without IndexVariables. Done means these use cases are represented without losing the existing large-array coverage.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.