tobogganSe connecter

louise

The Louise language: compiler, runtime, std, tooling

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

Runtime: intern the common request header names

tl_http_parse_request built a fresh Louise string per header name per
request. The 66 spellings virtually every request uses (browsers and
curl capitalise; many clients, and HTTP/2, lowercase) are now immortal
strings built once, matched by a 'match' on the name (a length switch
and a few byte compares), so a hit costs no allocation. A miss, or an
uncommon spelling, allocates as before; the exposed name keeps the
bytes as received either way. A binary search over the same table
cost more than the allocation it saved (+192M instructions on the
throwaway bench); the match wins it back and more: 4.81G -> 4.72G
(-1.8%).

olivier · il y a 1 mois · 9a61f4c628314208a1d2ed6ed6db7e47e6a79887

Parents 1d7d154

4 fichiers modifiés, 251 ajouts, 11 suppressions