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: speed up join close components #90

Conversation

peterlionelnewman
Copy link
Contributor

only need to compute the upper triangle of this nested loop:

line 110

    radii_matrix = np.full( (N, N), np.inf, dtype=np.float32 )
    index_matrix = np.full( (N, N, 2), -1, dtype=np.uint32 )

    for i in range(N):
      for j in range(i + 1, N):  # compute upper triangle only

@william-silversmith william-silversmith changed the title speed up join close components perf: speed up join close components Jul 19, 2024
@william-silversmith
Copy link
Contributor

Good catch! Thank you for the PR!

@william-silversmith william-silversmith added the performance Lower memory or faster computation. label Jul 19, 2024
@william-silversmith william-silversmith merged commit ca0c35b into seung-lab:master Jul 19, 2024
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Lower memory or faster computation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants