[v2,2/2] stdlib: Adjust the factor in tst-qsort5

Message ID 20231205032207.3183789-3-visitorckw@gmail.com
State New
Headers
Series stdlib: Optimize number of calls to comparison function in qsort |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
redhat-pt-bot/TryBot-32bit success Build for i686
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Testing passed
redhat-pt-bot/TryBot-still_applies warning Patch no longer applies to master

Commit Message

Kuan-Wei Chiu Dec. 5, 2023, 3:22 a.m. UTC
  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(-)
  

Patch

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