public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pyroaring] f43: Add a bcond to optionally run benchmarks
@ 2026-10-08 14:02 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-10-08 14:02 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-pyroaring
Branch : f43
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=f43
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-08 14:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 14:02 [rpms/python-pyroaring] f43: Add a bcond to optionally run benchmarks Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox