Commit b4f58c2c authored by Ben Noordhuis's avatar Ben Noordhuis Committed by Rich Trott
Browse files

src: micro-optimize ALPN negotiation

99 out of a 100 times (conservative estimate!) the negotiated protocol
will be either "h2" or "http/1.1" so reuse an existing JS string for
those instead of creating a new one every time.

PR-URL: https://github.com/nodejs/node/pull/26836


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarSam Roberts <vieuxtech@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
parent 3f41fcbe
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