Skip to content

ShortestPath memory improvement - #8

Open
rschio wants to merge 1 commit into
yourbasic:masterfrom
rschio:path_mem
Open

ShortestPath memory improvement#8
rschio wants to merge 1 commit into
yourbasic:masterfrom
rschio:path_mem

Conversation

@rschio

Copy link
Copy Markdown

Hi Korthaj, when i was using the ShortestPath function i noticed that it was using a significant amount of memory (I was processing a large graph).
It seems that the closure is allocated (or a pointer to it) at each iteration of the loop which makes the function use more memory.

name old time/op new time/op delta
ShortestPaths-8 154µs ± 0% 85µs ± 0% -45.02%
name old alloc/op new alloc/op delta
ShortestPaths-8 81.0kB ± 0% 41.1kB ± 0% -49.26%
name old allocs/op new allocs/op delta
ShortestPaths-8 849 ± 0% 17 ± 0% -98.00%

This package and your blog are awsome.

-Rodrigo

@korthaj

korthaj commented Sep 13, 2020 via email

Copy link
Copy Markdown
Member

@rschio

Copy link
Copy Markdown
Author

No problem, thank you.

@marco-m

Copy link
Copy Markdown

Hello @korthaj, would you have time now to look at this PR? It looks promising.
As @rschio, I do enjoy your blog and this module :-)
thanks!

@korthaj

korthaj commented Jun 6, 2021 via email

Copy link
Copy Markdown
Member

@rschiorschio mentioned this pull request Oct 21, 2022
Sign up for freeto 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.

3 participants

@rschio@korthaj@marco-m