Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: Avoid allocations in TrapezoidBounds::inside #3705

Merged

Conversation

andiwand
Copy link
Contributor

@andiwand andiwand commented Oct 9, 2024

Looking at some flame graphs I spotted some allocations in TrapezoidBounds::inside which should not be necessary. It does not look like it had a big impact.

Apart from that I decided to replace the generic template argument for insidePolygon with a span.


This pull request includes several changes to the Acts library, focusing on improving the handling of vertex data by using std::span and enhancing the boundary check logic. The most important changes include the introduction of std::span for vertex containers, the addition of necessary includes, and the modification of boundary check methods to use std::span.

Improvements to vertex handling:

Inclusion of necessary headers:

Boundary check logic enhancements:

@github-actions github-actions bot added the Component - Core Affects the Core module label Oct 9, 2024
Copy link

github-actions bot commented Oct 9, 2024

📊: Physics performance monitoring for 68a6fed

Full contents

physmon summary

@andiwand andiwand added this to the next milestone Oct 9, 2024
Copy link
Contributor

@asalzburger asalzburger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool trick.

@asalzburger
Copy link
Contributor

I think gcc now swallows that, do you want to un-draft it?

@andiwand andiwand marked this pull request as ready for review October 10, 2024 08:17
Copy link

sonarcloud bot commented Oct 10, 2024

@kodiakhq kodiakhq bot merged commit 09ed7f3 into acts-project:main Oct 10, 2024
44 checks passed
@andiwand andiwand deleted the perf-avoid-allocation-in-trapezoid-inside branch October 10, 2024 09:44
@acts-project-service acts-project-service added the Fails Athena tests This PR causes a failure in the Athena tests label Oct 11, 2024
@paulgessinger paulgessinger modified the milestones: next, v37.1.0 Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Core Affects the Core module Fails Athena tests This PR causes a failure in the Athena tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants