is just simple comparison with “/”. And the regex “^” will be run only
for “/” requests.
Thanks for the explanation.
PS It could be interesting to measure how noticeable the difference
is. Precompiled hooked regexps aren’t that slow… But I don’t have
an idea of realistic benchmark.
On Thu, Jan 22, 2009 at 09:59:43PM +0100, Marcin K. wrote:
Thanks for the explanation.
PS It could be interesting to measure how noticeable the difference
is. Precompiled hooked regexps aren’t that slow… But I don’t have
an idea of realistic benchmark.
Regexs may differ in times than simple comparison, however it will
not be noticeable in the big picture.
BTW, if you have
location = / {
}
location / {
}
then in 0.7.x “= /” is for free.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.