Limited by std::vector creation, deallocation and copying #36
Unanswered
asalzburger
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I could speed up the Something that should work for all fixed size |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here's something that might be of interest @krasznaa @stephenswat @paulgessinger @niermann999.
I have now implemented a system for a single layer test, one barrel layer, one end cap layer with the following tests:
a barrel layer has N surfaces and an approach surface: I shoot M particles onto the approach surface and then ask a local grid for the indices of all transforms of surfaces in question, and then intersect only those, this is usually 6 or 9 surfaces per test
then I do the same test with a trial-and-error, i.e. testing all surfaces for intersection running indices from 0 to N and take only the intersected ones, this is 12 x 7 = 84 surfaces per test
Good thing: both methods achieve the same result, below are the pictures for barrel and end cap case:
Now, here's the interesting part, the second version is actually faster in my tests:
Because half of the time is actually spent in finding out and especially allocating the return vector of indices to the program:
I.e. the O(
ns
) intersection estimation for the surfaces outperforms the data storage model ...Beta Was this translation helpful? Give feedback.
All reactions