I've been using gperf in other places, so I figured I might as well make HTTP parsing a teeny bit faster and allow us to avoid generating more garbage up front.
Eric Wong (3): unit benchmark for our HTTP parser http: use gperf for common fields optimization http: memoize more common fields .gitignore | 1 + GNUmakefile | 18 ++++- ext/unicorn_http/common_field_optimization.h | 79 +++++--------------- ext/unicorn_http/common_fields.gperf | 66 ++++++++++++++++ ext/unicorn_http/gperf.rb | 27 +++++++ test/benchmark/http_parser.rb | 43 +++++++++++ 6 files changed, 170 insertions(+), 64 deletions(-) create mode 100644 ext/unicorn_http/common_fields.gperf create mode 100644 ext/unicorn_http/gperf.rb create mode 100644 test/benchmark/http_parser.rb -- EW -- unsubscribe: unicorn-public+unsubscr...@bogomips.org archive: https://bogomips.org/unicorn-public/