From: Kuan-Wei Chiu <visitorckw@gmail.com>
To: fweimer@redhat.com
Cc: libc-alpha@sourceware.org, adhemerval.zanella@linaro.org,
goldstein.w.n@gmail.com, Kuan-Wei Chiu <visitorckw@gmail.com>
Subject: [PATCH v2 2/2] stdlib: Adjust the factor in tst-qsort5
Date: Tue, 5 Dec 2023 11:22:07 +0800 [thread overview]
Message-ID: <20231205032207.3183789-3-visitorckw@gmail.com> (raw)
In-Reply-To: <20231205032207.3183789-1-visitorckw@gmail.com>
Adjust the factor in the tst-qsort5 from 4.5 to 3.5 to better align
with the current implementation characteristics. This refinement is
prompted by the adoption of the bottom-up heapsort optimization, as
it significantly reduces the required comparisons.
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
---
Changes from v1:
* Adjusted the factor in tst-qsort5 from 4.5 to 3.5.
stdlib/tst-qsort5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stdlib/tst-qsort5.c b/stdlib/tst-qsort5.c
index d3a88c30f8..63590967a6 100644
--- a/stdlib/tst-qsort5.c
+++ b/stdlib/tst-qsort5.c
@@ -155,7 +155,7 @@ check_one_n (size_t n)
n, count, factor);
/* This is an arbitrary factor which is true for the current
implementation across a wide range of sizes. */
- TEST_VERIFY (factor <= 4.5);
+ TEST_VERIFY (factor <= 3.5);
}
static int
--
2.25.1
next prev parent reply other threads:[~2023-12-05 3:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-02 21:48 [PATCH] stdlib: Optimize number of calls to comparison function Kuan-Wei Chiu
2023-12-04 8:20 ` Florian Weimer
2023-12-04 18:31 ` Kuan-Wei Chiu
2023-12-05 10:44 ` Florian Weimer
2023-12-05 20:00 ` Kuan-Wei Chiu
2023-12-05 20:35 ` Zack Weinberg
2023-12-06 10:21 ` Florian Weimer
2023-12-06 12:51 ` Adhemerval Zanella Netto
2023-12-17 15:42 ` Zack Weinberg
2023-12-17 15:55 ` Florian Weimer
2023-12-17 16:47 ` Kuan-Wei Chiu
2023-12-17 18:02 ` Florian Weimer
2023-12-05 3:22 ` [PATCH v2 0/2] stdlib: Optimize number of calls to comparison function in qsort Kuan-Wei Chiu
2023-12-05 3:22 ` [PATCH v2 1/2] " Kuan-Wei Chiu
2023-12-05 3:22 ` Kuan-Wei Chiu [this message]
2024-02-16 7:08 ` [PATCH] stdlib: Optimize number of calls to comparison function Kuan-Wei Chiu
2024-03-27 19:45 ` Adhemerval Zanella Netto
2024-03-27 19:59 ` Kuan-Wei Chiu
2024-03-27 20:42 ` Adhemerval Zanella Netto
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231205032207.3183789-3-visitorckw@gmail.com \
--to=visitorckw@gmail.com \
--cc=adhemerval.zanella@linaro.org \
--cc=fweimer@redhat.com \
--cc=goldstein.w.n@gmail.com \
--cc=libc-alpha@sourceware.org \
/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.
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).