public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/python-pyroaring] rawhide: Add a bcond to optionally run benchmarks
Date: Thu, 08 Oct 2026 13:36:03 GMT	[thread overview]
Message-ID: <179146656386.1.2283893104835668762.rpms-python-pyroaring-f7c7438c0912@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/python-pyroaring
Branch : rawhide
Commit : f7c7438c0912420e3f355a0e2aeffa2813a79796
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-10-08T14:24:52+01:00
Stats  : +18/-2 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/python-pyroaring/c/f7c7438c0912420e3f355a0e2aeffa2813a79796?branch=rawhide

Log:
Add a bcond to optionally run benchmarks

---
diff --git a/python-pyroaring.spec b/python-pyroaring.spec
index d862a1b..62f93dd 100644
--- a/python-pyroaring.spec
+++ b/python-pyroaring.spec
@@ -1,3 +1,6 @@
+# We don’t normally run benchmarks, but it’s nice to be able to.
+%bcond benchmarks 0
+
 Name:           python-pyroaring
 Version:        1.0.3
 Release:        %autorelease
@@ -13,8 +16,13 @@ Source:         %{url}/archive/%{version}/PyRoaringBitMap-%{version}.tar.gz
 
 # Respect system compiler flags (no -O3)
 #
-# Downstream-only because upstream validly wants to add -O3 (but we have not
-# proven it is justified).
+# Downstream-only because upstream validly wants to add -O3, but we have not
+# proven it is justified. A casual comparative benchmark on x86_64 showed no
+# consistent and measurable improvement, and perhaps a small loss in some
+# microbenchmarks. This makes sense because we use the system croaring library,
+# and if there are any routines that benefit from -O3, they are likely to be in
+# those inner “hot” loops, not in the surrounding “glue” in the Python
+# extension.
 Patch:          0001-Respect-system-compiler-flags-no-O3.patch
 # Do not build bundled croaring library; link libroaring
 #
@@ -28,6 +36,10 @@ Patch:          0002-Do-not-build-bundled-croaring-library-link-libroarin.patch
 
 BuildRequires:  gcc-c++
 BuildRequires:  pkgconfig(roaring)
+%if %{with benchmarks}
+BuildRequires:  %{py3_dist pandas}
+BuildRequires:  %{py3_dist tabulate}
+%endif
 
 # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
 ExcludeArch:    %{ix86}
@@ -69,6 +81,10 @@ printf '#include <%s>\n' 'roaring/roaring.h' > pyroaring/roaring.h
 %pyproject_check_import
 %tox --toxenv=%{toxenv}
 
+%if %{with benchmarks}
+%{py3_test_envvars} %{python3} ./quick_bench.py
+%endif
+
 
 %files -n python3-pyroaring -f %{pyproject_files}
 %doc README.rst

                 reply	other threads:[~2026-10-08 13:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=179146656386.1.2283893104835668762.rpms-python-pyroaring-f7c7438c0912@fedoraproject.org \
    --to=code@musicinmybrain.net \
    --cc=git-commits@fedoraproject.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