querystring: optimize parse and stringify by mscdex · Pull Request #847 · nodejs/node
referenced this pull request in ceejbot/io.js
Feb 14, 2015Double negation considered slower than a straight null check.
brendanashworth pushed a commit that referenced this pull request
Feb 15, 2015PR-URL: #847 Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
rvagg
mentioned this pull request
parse optimizations: * Move try-catch to separate function to keep entire function from being deoptimized. * Use key array lookup instead of using hasOwnProperty. * Avoid decoding known empty strings. * Avoid possibly unnecessary switch to slower decoder for values if key decoding throws. stringify optimizations: * Use manual loop for default encoder instead of encodeURIComponent. * Use string concatenation instead of joining an array of strings. * Avoid caching result of typeof.
mscdex added a commit to mscdex/io.js that referenced this pull request
Mar 16, 2015parse optimizations: * Move try-catch to separate function to keep entire function from being deoptimized. * Use key array lookup instead of using hasOwnProperty. * Avoid decoding known empty strings. * Avoid possibly unnecessary switch to slower decoder for values if key decoding throws. stringify optimizations: * Use manual loop for default encoder instead of encodeURIComponent. * Use string concatenation instead of joining an array of strings. * Avoid caching result of typeof. PR-URL: nodejs#847 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
mscdex
deleted the
perf-querystring
branch
rvagg
mentioned this pull request
rvagg
mentioned this pull request
rvagg added a commit that referenced this pull request
Mar 20, 2015Notable Changes: * path: New type-checking on path.resolve() <#1153> uncovered some edge-cases being relied upon in the wild, most notably path.dirname(undefined). Type-checking has been loosened for path.dirname(), path.basename(), and path.extname(), (Colin Ihrig) <#1216>. * querystring: Internal optimizations in querystring.parse() and querystring.stringify() <#847> prevented Number literals from being properly converted via querystring.escape() <#1208>, exposing a blind-spot in the test suite. The bug and the tests have now been fixed (Jeremiah Senkpiel) <#1213>.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters