-
Notifications
You must be signed in to change notification settings - Fork 26
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
Performance of iterating with delaunayedges
#47
Comments
I'll take a look into it... |
ok. Some results. The function function edgeiter(it)
i = 0
for e in it
i += 1
end
end
it = delaunayedges(tess)
@btime edgeiter($it)
27.554 μs (0 allocations: 0 bytes) That being said, this solution is not good for everybody and the performance is not good enough. The correct solution is to write a proper iterator. I'll do this, it will take a few days though... EDIT: a typo (was |
I fixed the example above... |
Thanks for looking into this. I'll appreciate the proper iterator when you have time for it. |
As a temporary fix, we could also use an eagerly allocating variant like:
Tested on my dataset (2.7M tris) it caused a ~10x speed-up over the Channel-based variant. I also eliminated the need for the |
Iterating over
delaunayedges
is a few hundred times slower and makes significant allocations compared to directly iterating over a DelaunayTessellation2D for triangles.Example:
Any idea on how to make this faster? When I have thousands of points the
delaunayedges
iteration time is significantly large for my application.The text was updated successfully, but these errors were encountered: