Thread (94 messages) 94 messages, 4 authors, 2021-01-14

Re: [PATCH v2 01/20] pack-revindex: introduce a new API

flat view

From: Jeff King <hidden>
Date: 2021-01-14 19:20:01

On Thu, Jan 14, 2021 at 12:06:20PM -0500, Taylor Blau wrote:
quoted
quoted
+ * This function runs in time O(log N) with the number of objects in the pack.
Is it a good idea to commit to such performance characteristics as a
promise to callers like this (the comment applies to all three
functions)?

It depends on how a developer is helped by this comment when
deciding whether to use this function, or find other ways, to
implement what s/he wants to do.
I don't mind it. If they all had the same performance characteristics, I
wouldn't be for it, but since they don't, I think that it's good to
know. Peff suggested this back in [1].
Yeah, I asked for this. As somebody who has frequently worked on the
code which accesses the revindex (mostly bitmap stuff), I found it
useful to understand how expensive the operations were.  However, I also
know what their runtimes are at this point, and it is not like somebody
interested cannot look at the implementation. So it may not be that
important.

So I do still think it is useful, but if somebody feels strongly against
it, I don't mind it being removed.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help