git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Kyle Zhao via GitGitGadget <gitgitgadget@gmail.com>, git@vger.kernel.org
Cc: Taylor Blau <me@ttaylorr.com>, Kyle Zhao <keyu98@qq.com>,
	kylezhao <kylezhao@tencent.com>
Subject: Re: [PATCH v2] pack-revindex.h: correct the time complexity descriptions
Date: Wed, 15 Sep 2021 16:12:11 +0700	[thread overview]
Message-ID: <67cfff14-8158-6401-b0f2-1f6de37c5815@gmail.com> (raw)
In-Reply-To: <pull.1039.v2.git.1631696964072.gitgitgadget@gmail.com>

On 15/09/21 16.09, Kyle Zhao via GitGitGadget wrote:
> From: kylezhao <kylezhao@tencent.com>
> 
> Time complexities for pack_pos_to_midx and midx_to_pack_pos are swapped,
> correct it.
> 
> Signed-off-by: kylezhao <kylezhao@tencent.com>
> ---
<snip>...
>   pack-revindex.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/pack-revindex.h b/pack-revindex.h
> index 479b8f2f9c9..74f4eae668d 100644
> --- a/pack-revindex.h
> +++ b/pack-revindex.h
> @@ -109,7 +109,7 @@ off_t pack_pos_to_offset(struct packed_git *p, uint32_t pos);
>    * If the reverse index has not yet been loaded, or the position is out of
>    * bounds, this function aborts.
>    *
> - * This function runs in time O(log N) with the number of objects in the MIDX.
> + * This function runs in constant time.
>    */
>   uint32_t pack_pos_to_midx(struct multi_pack_index *m, uint32_t pos);
>   
> @@ -120,7 +120,7 @@ uint32_t pack_pos_to_midx(struct multi_pack_index *m, uint32_t pos);
>    * If the reverse index has not yet been loaded, or the position is out of
>    * bounds, this function aborts.
>    *
> - * This function runs in constant time.
> + * This function runs in time O(log N) with the number of objects in the MIDX.
>    */
>   int midx_to_pack_pos(struct multi_pack_index *midx, uint32_t at, uint32_t *pos);
>   
> 
> base-commit: 8b7c11b8668b4e774f81a9f0b4c30144b818f1d1
> 

OK.

Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>

-- 
An old man doll... just what I always wanted! - Clara

  reply	other threads:[~2021-09-15  9:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15  8:42 [PATCH] pack-revindex.h: fix typos of time complexity Kyle Zhao via GitGitGadget
2021-09-15  8:48 ` Bagas Sanjaya
2021-09-15  9:09 ` [PATCH v2] pack-revindex.h: correct the time complexity descriptions Kyle Zhao via GitGitGadget
2021-09-15  9:12   ` Bagas Sanjaya [this message]
2021-09-16  5:10   ` Taylor Blau
2021-09-16  5:15     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67cfff14-8158-6401-b0f2-1f6de37c5815@gmail.com \
    --to=bagasdotme@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=keyu98@qq.com \
    --cc=kylezhao@tencent.com \
    --cc=me@ttaylorr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).