Commit 4b59db00 authored by Gabriel Wicke's avatar Gabriel Wicke Committed by Fedor Indutny
Browse files

Add fast path for simple URL parsing

This patch adds a fast path for parsing of simple path-only URLs, as commonly
found in HTTP requests received by a server.

Benchmark results [ms], before / after patch:
/foo/bar              0.008956   0.000418 (fast path used)
http://example.com/

   0.011426   0.011437 (normal slow path, no change)

In a simple 'ab' benchmark of a single-threaded web server, this patch
increases the request rate from around 6400 to 7400 req/s.

Reviewed-By: default avatarFedor Indutny <fedor@indutny.com>
parent ff6117b8
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment