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

Improve multi stop plan unit generation #39

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

dirkschumacher
Copy link
Contributor

@dirkschumacher dirkschumacher commented May 10, 2024

Explored a bit to reduce some overhead when generating sequences for move generation. In addition this has the effect that we don't spawn go routines so deep in the search.

Below are two smaller benchmark tests. The full set I cannot yet run until #47 is fixed, but this already captures some of the benefits here as it's mostly about allocations.

name                                          old time/op    new time/op    delta
pkg:github.com/nextmv-io/nextroute goos:darwin goarch:arm64
SequenceGenerator3-8                            15.2µs ± 0%    13.6µs ± 0%  -10.39%
pkg:github.com/nextmv-io/nextroute/tests/golden goos:darwin goarch:arm64
Golden/testdata/precedence_pathologic.json-8    4.56ms ± 0%    2.29ms ± 0%  -49.73%

name                                          old alloc/op   new alloc/op   delta
pkg:github.com/nextmv-io/nextroute goos:darwin goarch:arm64
SequenceGenerator3-8                            6.38kB ± 0%    5.99kB ± 0%   -6.04%
pkg:github.com/nextmv-io/nextroute/tests/golden goos:darwin goarch:arm64
Golden/testdata/precedence_pathologic.json-8    9.74MB ± 0%    5.10MB ± 0%  -47.66%

name                                          old allocs/op  new allocs/op  delta
pkg:github.com/nextmv-io/nextroute goos:darwin goarch:arm64
SequenceGenerator3-8                              71.0 ± 0%      69.0 ± 0%   -2.82%
pkg:github.com/nextmv-io/nextroute/tests/golden goos:darwin goarch:arm64
Golden/testdata/precedence_pathologic.json-8     73.3k ± 0%     49.0k ± 0%  -33.26%

@dirkschumacher dirkschumacher marked this pull request as draft May 11, 2024 06:24
Copy link
Member

@merschformann merschformann left a comment

Choose a reason for hiding this comment

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

In which state is this? 🤔

@dirkschumacher
Copy link
Contributor Author

@merschformann I want to do some further benchmarking. I'll ping you all again once that is done

@dirkschumacher dirkschumacher marked this pull request as ready for review May 13, 2024 13:27
@dirkschumacher dirkschumacher marked this pull request as draft May 13, 2024 13:27
@dirkschumacher dirkschumacher marked this pull request as ready for review May 13, 2024 13:28
@dirkschumacher
Copy link
Contributor Author

dirkschumacher commented May 13, 2024

🤔 linter

@dirkschumacher
Copy link
Contributor Author

Waiting on #47 to fix some benchmark tests

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