ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "alanwu (Alan Wu) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "alanwu (Alan Wu)" <noreply@ruby-lang.org>
Subject: [ruby-core:117266] [Ruby master Bug#20203] `TestEnumerable` test failures with GCC 14
Date: Wed, 20 Mar 2024 18:32:15 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-107391.20240320183214.703@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-20203.20240122171042.703@ruby-lang.org

Issue #20203 has been updated by alanwu (Alan Wu).

File sort-benchmark-ubuntu.png added
File sort-benchmark-macos.png added

I ran some benchmarks comparing the builtin `ruby_qsort()` and `qsort_r()` on macOS with an M1 chip and on Ubuntu 22.04 (glibc 2.35) wtih a Xeon Platinum 8000 chip. The rubies are built off of commit:3f5f04afa7 and the `ruby_qsort()` one is built with `configure ac_cv_func_qsort_r=no` to use the builtin sort (verified with a debugger). Note that I used `benchmark-driver` in `time` mode, which picks the number times to repeat based on the workload, so larger input size doesn't necessarily run longer.

![](sort-benchmark-ubuntu.png)
![](sort-benchmark-macos.png)

With shuffled inputs, the builtin sort is about 5% faster on macOS but 10 to 20% slower on Ubuntu. The builtin sort seems very good with ordered inputs and outperforms `qsort_r()` across the board.

Considering it's faster on macOS, I think the builtin sort has acceptable performance.

----------------------------------------
Bug #20203: `TestEnumerable` test failures with GCC 14
https://bugs.ruby-lang.org/issues/20203#change-107391

* Author: vo.x (Vit Ondruch)
* Status: Open
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
There is ongoing mass rebuild in Fedora and that is first time GCC 14 is used and we observe test failures in `TestEnumerable`. Here are a few examples:

~~~
[ 3000/26419] TestEnumerable#test_transient_heap_sort_bymalloc_consolidate(): unaligned fastbin chunk detected
~~~

~~~
[ 2455/26535] TestEnumerable#test_transient_heap_sort_bycorrupted size vs. prev_size in fastbins
~~~

~~~
[ 9716/26532] TestEnumerable#test_any_with_unused_blockdouble free or corruption (fasttop)
~~~

The full logs are accessible [here](https://koji.fedoraproject.org/koji/taskinfo?taskID=112176941). Please drill through `Descendants` and `build.log`

---Files--------------------------------
sort-benchmark-ubuntu.png (233 KB)
sort-benchmark-macos.png (232 KB)


-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

      parent reply	other threads:[~2024-03-20 18:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22 17:10 [ruby-core:116370] [Ruby master Bug#20203] `TestEnumerable` test failures with GCC 14 vo.x (Vit Ondruch) via ruby-core
2024-01-23 11:45 ` [ruby-core:116375] " vo.x (Vit Ondruch) via ruby-core
2024-01-23 11:57 ` [ruby-core:116376] " vo.x (Vit Ondruch) via ruby-core
2024-01-23 13:42 ` [ruby-core:116378] " vo.x (Vit Ondruch) via ruby-core
2024-01-23 16:53 ` [ruby-core:116383] " vo.x (Vit Ondruch) via ruby-core
2024-01-24 11:07 ` [ruby-core:116403] " vo.x (Vit Ondruch) via ruby-core
2024-01-24 11:27 ` [ruby-core:116407] " fweimer (Florian Weimer) via ruby-core
2024-01-25  0:18 ` [ruby-core:116434] " alanwu (Alan Wu) via ruby-core
2024-02-01 16:21 ` [ruby-core:116548] " alanwu (Alan Wu) via ruby-core
2024-02-14  5:30 ` [ruby-core:116732] " ko1 (Koichi Sasada) via ruby-core
2024-03-14  9:40 ` [ruby-core:117148] " mame (Yusuke Endoh) via ruby-core
2024-03-20 18:32 ` alanwu (Alan Wu) via ruby-core [this message]

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-list from there: mbox

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

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

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

  git send-email \
    --in-reply-to=redmine.journal-107391.20240320183214.703@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    --cc=noreply@ruby-lang.org \
    --cc=ruby-core@ml.ruby-lang.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).