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
perf: use switch to detect method #5413
Conversation
The benchmark label seems broken |
Node: 16 Node: 18 Node: 20 |
Node: 16 Node: 18 Node: 20 |
Second one is slightly more relevant as it tests contentType parsers and mainly uses 'POST' instead of 'GET' GET gets matched immediately in both cases so it's not very useful |
Node: 16 Node: 18 Node: 20 |
Node: 16 Node: 18 Node: 20 |
This won't be needed after #5419 |
As more methods are added, the difference should get more significant
Also switch is more readable in my opinion