Xarray optimizations
Brings the baseline runtime for the most simple (single link) 365-days simulation from 850 ms to 180 ms (no unit conversion) / from 870 ms to 430 ms (with unit conversion).
Push&pull with numpy data goes from 2 ms to 1.4 ms, for xarray data from 2 ms to 0.37 ms.
- Avoid conversion in
to_units()
if not reqiured- No-op from 400us to 16us
- Assign time in
assign_time()
inplace if axis exists- From 800us to 25us
- From 37% of simple run to 3%
- Breaks indexing with time values via
xdata.loc[t]
- Will leave as is for now, as we don't use indexing anywhere, and make an issue for it.
- Add a simplified implementation for
to_datetime
, without all the overhead- From 260us to 25us
- From 20% of simple run to 3%
Edited by Martin Lange
Merge request reports
Activity
Filter activity
assigned to @mlange
removed performance label
added 1 commit
- 3d707e3a - assign time inplace if axis exists: 800us -> 25us
added 1 commit
- 0cffe81e - simplify and optimize units extraction tools
added 1 commit
- d089edd4 - use a faster custom implementation for to_datetime
mentioned in issue #88 (closed)
added 1 commit
- 6e6ae766 - add benchmarks for units comparison functions
added 1 commit
- fa56edfa - slightly optimize tool function `equivalent_units`
added 1 commit
- 63d9b3a9 - add profiling and benchmarks for runs with numpy arrays
Please register or sign in to reply