You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
I took a look at patterns.nim and in the check() function found this line of code:
return s.substr(i, cutTo) == n.text
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).
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: