Skip to content

Avoid string allocation in tree lookup for every request #51

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

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

Conversation

gallir
Copy link

@gallir gallir commented Apr 6, 2019

path := string() allocates a new string for every call, use
the same b2s() function as in fasthttp to avoid the allocation.

path := string() allocates a new string for every call, use
the same b2s() function as in fasthttp to avoid the allocation.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.008%) to 98.253% when pulling d098ad7 on gallir:b2s into 979d6e5 on buaazp:master.

@savsgio
Copy link

savsgio commented Apr 25, 2019

Hi @gallir,

The official fasthttp organization is maintaining this repo in https://github.com/fasthttp/router.
It has some improvements and optimizations in performance. I recommend you use it.

Thanks.

@savsgio
Copy link

savsgio commented Apr 26, 2019

path := string() allocates a new string for every call, use
the same b2s() function as in fasthttp to avoid the allocation.

This change is did in official router repository.

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