Uh oh!
There was an error while loading. Please reload this page.
Optimize some copying - #7209
Conversation
dcherian
commented
Oct 28, 2022
Thanks @headtr1ck do we have a benchmark for this, if not can we add one please? |
headtr1ck
commented
Oct 29, 2022
Since the benchmark didn't change we either don't have one or my change doesn't matter much, haha. I think the most important change is the shallow copy for |
dschwoerer
commented
Nov 2, 2022
The change does matter - but deep copies are still much more expensive than they used to be (as to be expected, I guess) |
headtr1ck
commented
Nov 2, 2022
Do you by any chance know which parts have improved, so we can add them as a benchmark here? |
I added a benchmark for Any ideas what else to test? |
benbovy
commented
Nov 7, 2022
The change in
|
headtr1ck
commented
Nov 29, 2022
Are we merging this anyway, or should we try harder to find a benchmark that shows some improvement? |
dcherian
commented
Nov 29, 2022
I don't think we need a benchmark to merge. Sorry that wasn't clear, it mostly for information purposes.
Great! let's merge |
* upstream/main: (39 commits) Support the new compression argument in netCDF4 > 1.6.0 (pydata#6981) Remove setuptools-scm-git-archive, require setuptools-scm>=7 (pydata#7253) Fix mypy failures (pydata#7343) Docs: add example of writing and reading groups to netcdf (pydata#7338) Reset file pointer to 0 when reading file stream (pydata#7304) Enable mypy warn unused ignores (pydata#7335) Optimize some copying (pydata#7209) Add parse_dims func (pydata#7051) Fix coordinate attr handling in `xr.where(..., keep_attrs=True)` (pydata#7229) Remove code used to support h5py<2.10.0 (pydata#7334) [pre-commit.ci] pre-commit autoupdate (pydata#7330) Fix PR number in what’s new (pydata#7331) Enable `origin` and `offset` arguments in `resample` (pydata#7284) fix doctests: supress urllib3 warning (pydata#7326) fix flake8 config (pydata#7321) implement Zarr v3 spec support (pydata#6475) Fix polyval overloads (pydata#7315) deprecate pynio backend (pydata#7301) mypy - Remove some ignored packages and modules (pydata#7319) Switch to T_DataArray in .coords (pydata#7285) ...
whats-new.rstI have passed along some more memo dicts, which could prevent some double deep-copying of the same data (don't know how exactly, but who knows :P)
Also, I have found some copy calls that did not pass along the deep argument (I am not sure if that breaks things, lets find out).
And finally I have found some places where shallow copies are enough.
All together it should improve the performance a lot when copying things around.