Repository navigation
Conversation
…ree with the same command at the same path
ArjunS07
merged commit Oct 8, 2026
c11b26e
into
survey/phase1-template-shadow-conftest
0 of 3 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Make paired timing compare the patch, not two different builds. When a patch touches compiled sources, only the patched tree is rebuilt, and the base copy keeps the image's build.
How it works
test.shrebuilds the patched tree (FC_REBUILD_CMD,rebuild.sh) before timing. The base copy/workspace/.fc_basewas copied before that, so it still has the image's original build. If the trial's rebuild uses different flags or a different path than the image build (for example,setup.py build_ext --inplaceafter bothpip install -eattempts fail), the timed difference includes the build difference.lsv_measure.pynow runsFC_REBUILD_CMDon the base copy at the repo path (withbase_in_place(), as for the timing rounds), then on the patched tree again, before paired timing. Both sides come from the same command at the same path. A failed rebuild ends the measure with an error instead of timing two different builds. The log isrebuild_both.log.Changes
template/tests/lsv_measure.py:rebuild_both_sides(), called beforemeasure_pairedwhenFC_REBUILD_CMDis set.ufunc_object.c. In the survey's approved records with rebuilds, the share of no-change benchmarks with |log speedup| > 0.1 is 0.29 (numpy#21464), 0.42 (bottleneck#329) and 0.16 (bottleneck#327), against at most 0.07 for the other 20.tests/docker/test_lsv_paired_measure.py: the rebuild runs base first and then patched, both at the repo path, and a failed base rebuild leaves the patched tree in place.Verification
tests/docker: the 7 failures present without the change are unchanged.Notes