querystring: improve unescapeBuffer() performance
Before this, v8 would deopt when an out of bounds `inIndex` would get passed to charCodeAt(). charCodeAt() returns NaN in such cases, so we directly emulate that behavior as well. Also, calls to charCodeAt() for constant strings have been replaced by the raw character codes and parser state is now stored as an integer instead of a string. Both of these provide a slight performance increase. PR-URL: https://github.com/nodejs/node/pull/5012 Reviewed-By:James M Snell <jasnell@gmail.com> Reviewed-By:
Roman Reiss <me@silverwind.io> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
parent
a2a69a2b
Please register or sign in to comment