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

build: toControllerOptions: micro-optimization #1907

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thaJeztah
Copy link
Member

Swapping the order of these checks, which I guess is the most minimal optimization possible

BenchmarkGetEnv-10    68764720    16.82  ns/op   0 B/op   0 allocs/op
BenchmarkMap-10      454135184     2.635 ns/op   0 B/op   0 allocs/op

@thaJeztah
Copy link
Member Author

Actually; looks like containerd has an epoch package that also provides parsing, which may address the TODO in this area.

@thaJeztah
Copy link
Member Author

opened #1908 as alternative

Swapping the order of these checks, which I guess is the most minimal
optimization possible

    BenchmarkGetEnv-10    68764720    16.82  ns/op   0 B/op   0 allocs/op
    BenchmarkMap-10      454135184     2.635 ns/op   0 B/op   0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants