http: optimize checkIsHttpToken for short strings · nodejs/node@83ae610 · GitHub
Skip to content

Commit 83ae610

Browse files
JinhyeokFangtargos
authored andcommitted
http: optimize checkIsHttpToken for short strings
Use lookup table instead of regex for strings shorter than 10 characters to improve performance for common short header names while maintaining compatibility. PR-URL: #59832 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 9782ca2 commit 83ae610

1 file changed

Lines changed: 37 additions & 1 deletion

File tree

lib/_http_common.js

Lines changed: 37 additions & 1 deletion

0 commit comments

Comments
 (0)