-
Notifications
You must be signed in to change notification settings - Fork 119
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
patterns in Jester are very slow #244
Comments
I took a look at patterns.nim and in the check() function found this line of code:
This means that a partial copy of a string is made every time the check() function is called. For better performance a string comparison function should be used instead (zero-copy). In C I would use strncmp starting at position i with the length of cutTo, but as I'm new to Nim I'm not sure what the best way to do this is (string slices don't appear to be zero-copy from my research). |
Zero-copy string slices for Nim are in the works though. |
|
patterns in Jester are very slow compared to normal routes
i mean by more than half when i benchmark with wrk
that should be negligible
get "/hello/@name":
let val = @"name"
resp val
The text was updated successfully, but these errors were encountered: