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

csgtol-keyword becomes argument #238

Merged
merged 1 commit into from
Nov 2, 2021
Merged

csgtol-keyword becomes argument #238

merged 1 commit into from
Nov 2, 2021

Conversation

lmh91
Copy link
Collaborator

@lmh91 lmh91 commented Oct 30, 2021

Closes #207

Okay, I found out what the problem was. The compiler does not like keywords...

So the code

using BenchmarkTools
using SolidStateDetectors
sim = Simulation(SSD_examples[:InvertedCoax]);
g = sim.detector.contacts[2].geometry; # consists out of 6 primitives
pt = CartesianPoint{Float32}(100, 0, 0); #outside
in(pt, g); @btime in($pt, $g); 

results in
on v0.7.1: 149.599 ns (6 allocations: 608 bytes)
with this PR: 84.456 ns (0 allocations: 0 bytes)

@lmh91 lmh91 added enhancement Improvement of existing features performance Performance improvements labels Oct 30, 2021
@lmh91 lmh91 requested a review from oschulz October 30, 2021 09:59
@lmh91 lmh91 merged commit f82cf58 into master Nov 2, 2021
@fhagemann fhagemann deleted the csg_in_allocs branch November 2, 2021 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing features performance Performance improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allocations in pt in CSG for large CSG's
1 participant