Skip to content

perf(detray): Avoid recomputation of tangential ray - #5789

Open
stephenswat wants to merge 5 commits into
acts-project:mainfrom
stephenswat:detray/perf/compute_tangential_once
Open

perf(detray): Avoid recomputation of tangential ray#5789
stephenswat wants to merge 5 commits into
acts-project:mainfrom
stephenswat:detray/perf/compute_tangential_once

Conversation

@stephenswat

Copy link
Copy Markdown
Member

The detray navigation functions currently recompute the tangential ray multiple times, even if this is not necessary. This commit changes the behaviour to compute the tangential once and then thread it through the visitor pattern.

@stephenswat
stephenswat requested a review from niermann999 as a code owner July 29, 2026 12:02
@stephenswat

Copy link
Copy Markdown
Member Author

Performance summary

Here is a summary of the performance effects of this PR:

Graphical

Tabular

KernelReciprocal ThroughputParallelism
8fe5044954ba3aDelta8fe5044954ba3a
propagate_to_next_surface6.72 ms6.54 ms-2.6%3.613.62
find_tracks1.19 ms1.19 ms-0.1%1.841.83
count_doublets818.27 μs818.61 μs0.0%1.611.61
count_triplets566.37 μs566.93 μs0.1%1.021.02
find_doublets542.44 μs534.47 μs-1.5%3.083.08
ccl_kernel434.06 μs435.39 μs0.3%1.711.71
Thrust::sort384.77 μs384.87 μs0.0%7.287.28
condense_tracks250.89 μs250.28 μs-0.2%5.755.76
find_triplets169.09 μs170.06 μs0.6%1.311.32
build_tracks124.61 μs124.98 μs0.3%3.713.71
select_seeds59.22 μs58.94 μs-0.5%1.341.34
estimate_track_params26.46 μs26.43 μs-0.1%2.692.68
populate_grid23.93 μs23.92 μs-0.0%1.221.22
count_grid_capacities22.04 μs22.03 μs-0.1%1.221.22
remove_duplicates19.75 μs19.97 μs1.1%25.8125.64
fill_sorted_measurements16.15 μs16.20 μs0.3%1.131.13
update_triplet_weights14.79 μs14.89 μs0.7%1.271.27
fill_finding_propagation_sort_keys8.78 μs8.76 μs-0.2%7.667.66
form_spacepoints8.29 μs8.26 μs-0.4%1.491.49
reduce_triplet_counts5.59 μs5.65 μs1.1%3.093.08
unknown5.04 μs5.05 μs0.1%4.284.28
fill_finding_duplicate_removal_sort_keys1.56 μs1.56 μs-0.0%38.1238.13
Thrust::scan1.05 μs1.05 μs-0.0%147.82147.81
Total11.41 ms11.23 ms-1.6%3.223.22

Important

All metrics in this report are given as reciprocal throughput, not as wallclock runtime.

Note

This is an automated message produced upon the explicit request of a human being.

Comment thread Detray/core/include/detray/navigation/detail/navigation_functions.hpp Outdated
@github-actions github-actions Bot added the Component - Detray Affects the Detray project label Jul 29, 2026
@github-actions github-actions Bot added this to the next milestone Jul 29, 2026
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

📊: Physics performance monitoring for aaa035f

Full contents

physmon summary

❗️: Downstream build failure

  • eic-shell EICrecon (cc @acts-project/epic-contacts)

@stephenswat
stephenswat force-pushed the detray/perf/compute_tangential_once branch from 954ba3a to acc5ddf Compare August 3, 2026 13:51
The detray navigation functions currently recompute the tangential ray
multiple times, even if this is not necessary. This commit changes the
behaviour to compute the tangential once and then thread it through the
visitor pattern.
@stephenswat
stephenswat force-pushed the detray/perf/compute_tangential_once branch from acc5ddf to dc8d410 Compare August 3, 2026 13:52
@stephenswat
stephenswat requested a review from niermann999 August 3, 2026 13:56
@stephenswat

Copy link
Copy Markdown
Member Author

Performance summary

Here is a summary of the performance effects of this PR:

Graphical

Tabular

KernelReciprocal ThroughputParallelism
c6fbf62dc8d410Deltac6fbf62dc8d410
propagate_to_next_surface5.21 ms5.13 ms-1.6%4.384.39
find_tracks1.19 ms1.18 ms-0.3%1.841.84
count_doublets811.35 μs812.61 μs0.2%1.611.61
count_triplets567.83 μs566.39 μs-0.3%1.021.02
find_doublets528.02 μs533.10 μs1.0%3.083.08
ccl_kernel433.83 μs434.89 μs0.2%1.711.71
Thrust::sort384.66 μs384.78 μs0.0%7.287.28
condense_tracks250.33 μs250.61 μs0.1%5.765.76
find_triplets168.30 μs168.58 μs0.2%1.321.32
build_tracks124.66 μs125.00 μs0.3%3.713.71
select_seeds59.42 μs58.57 μs-1.4%1.341.34
estimate_track_params26.51 μs26.48 μs-0.1%2.692.68
populate_grid23.94 μs23.92 μs-0.1%1.221.22
count_grid_capacities22.03 μs22.03 μs0.0%1.221.22
remove_duplicates19.89 μs19.86 μs-0.1%25.7325.71
fill_sorted_measurements16.12 μs16.24 μs0.7%1.131.13
update_triplet_weights14.70 μs14.79 μs0.6%1.271.27
fill_finding_propagation_sort_keys8.77 μs8.79 μs0.2%7.657.65
form_spacepoints8.37 μs8.31 μs-0.7%1.491.49
reduce_triplet_counts5.60 μs5.60 μs-0.1%3.083.08
unknown5.05 μs5.04 μs-0.2%4.274.28
fill_finding_duplicate_removal_sort_keys1.56 μs1.56 μs-0.2%38.0938.15
Thrust::scan1.06 μs1.06 μs0.1%147.81147.70
Total9.88 ms9.80 ms-0.8%3.573.57

Important

All metrics in this report are given as reciprocal throughput, not as wallclock runtime.

Note

This is an automated message produced upon the explicit request of a human being.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Public API surface diff

No change to the public API surface. ✅

niermann999
niermann999 previously approved these changes Aug 3, 2026
Comment thread Detray/core/include/detray/navigation/detail/navigation_functions.hpp Outdated
@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Component - Detray Affects the Detray project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants