Performance: a1, a1:a2, a1:a3, ...
Submitted by an unknown user
Link to original bug (#581808)
Description
See http://wiki.services.openoffice.org/wiki/Calc/Performance/sorting_values_within_functions
We use something like 27 minutes on recalculating that sheet. OO uses 12 minutes. They got to that by using a linear algorithm for median instead of sorting. We could do that too, but it still takes way too long.
There are two sections in the sheet: a "median" part (column C) and a percentile part (column H).
The column part has a fixed range. If we cache the sorted range like we do for lookups, then the cumulative time for percentile will be subsecond.
The real problem is with the median calls. There are a sequence of
increasing ranges:
C1=median($B1:
B1)
C2=median($B1:
B2)
C3=median($B1:
B3)
...
C65535=median($B1:
B65535)
If we can compute things in this order, we could extend a range by an extra element and keep the sorting. That would be wicked fast.
Version: git master