Skip to content

Performance boosts#65

Merged
JoeyT1994 merged 3 commits intomainfrom
PerformanceBoosts
Mar 31, 2026
Merged

Performance boosts#65
JoeyT1994 merged 3 commits intomainfrom
PerformanceBoosts

Conversation

@JoeyT1994
Copy link
Copy Markdown
Owner

Minor Changes - avoiding a few unnecessary array allocations.

JoeyT1994 and others added 3 commits March 31, 2026 13:47
Replace findall with findfirst, reuse Set via empty!, avoid intermediate
vector allocations in inner loops, and use tuple instead of typed array
for single-element ignore_edges.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
@JoeyT1994 JoeyT1994 merged commit 07b098b into main Mar 31, 2026
3 checks passed
@JoeyT1994 JoeyT1994 deleted the PerformanceBoosts branch March 31, 2026 19:03
es = sorted_edges(bmps_cache, pe)
g = partition_graph(bmps_cache, src(pe))
update_seq = vcat([es[i] for i in 1:length(es)], [es[i] for i in (length(es) - 1):-1:2])
update_seq = vcat(es, es[(end - 1):-1:2])
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
update_seq = vcat(es, es[(end - 1):-1:2])
update_seq = vcat(es, @view(es[(end - 1):-1:2]))

Can get rid of another allocation here ;)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Oh nice, didn't know you could do that. Added it in to the next PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants