Skip to content

Conversation

@rschio
Copy link

@rschio rschio commented Sep 13, 2020

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
Copy link
Member

korthaj commented Sep 13, 2020 via email

@rschio
Copy link
Author

rschio commented Sep 13, 2020

No problem, thank you.

@marco-m
Copy link

marco-m commented Jun 5, 2021

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
Copy link
Member

korthaj commented Jun 6, 2021 via email

@rschio rschio mentioned this pull request Oct 21, 2022
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.

3 participants