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

why not byte.Compare for this fastcache.go? #41

Open
gitmko0 opened this issue Oct 18, 2020 · 7 comments
Open

why not byte.Compare for this fastcache.go? #41

gitmko0 opened this issue Oct 18, 2020 · 7 comments

Comments

@gitmko0
Copy link

gitmko0 commented Oct 18, 2020

:392

byte.compare shld be faster?

if string(k) == string(chunk[idx:idx+keyLen]) {

@cristaloleg
Copy link

Why it should?

@gitmko0
Copy link
Author

gitmko0 commented Oct 18, 2020

byte comparison is faster?

@cristaloleg
Copy link

Why it should be?

@gitmko0
Copy link
Author

gitmko0 commented Oct 18, 2020

no need conversion of bytes to string

@gitmko0
Copy link
Author

gitmko0 commented Oct 19, 2020

there are many other optimization opportunities but this is one the most obvious. it's being used as a cache so let's make it as fast as it can be?

@cristaloleg
Copy link

other optimization opportunities

which one?

@gitmko0
Copy link
Author

gitmko0 commented Nov 2, 2020

This one
#36

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

No branches or pull requests

2 participants