Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Slowdown around 5.0.5-dev-0
On Oct 14, 9:50am, Bart Schaefer wrote:
} Subject: Re: Slowdown around 5.0.5-dev-0
}
} On Oct 14, 9:25am, Bart Schaefer wrote:
} }
} } NEWHEAPS() is O(1) where pushheap() is O(N) where N is the number of
} } arenas [...] the question is would it slow down in the more normal use
} } case of a mostly-empty heap and a lot of function calls
}
} Just as a data point, I tried swapping out the push/pop pair in the
} source() function with NEWHEAPS/OLDHEAPS [...]
} NEWHEAPS was slightly slower
I've now gone through all the pushheap() in the code ... after ruling out
the cases where the code between push and pop couldn't be neatly wrapped
as a { block }, the only other pair it might make sense to replace is in
sort.c:strmetasort() and even that is questionable.
Given that we have direct evidence that it's beneficial to use NEWHEAPS
in doshfunc() in at least one case, I'll go ahead and commit 36853 and
we can see how it goes.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author