For large JSON-compatible objects, JSON.parse is faster than JS object literals.
True for all browser JavaScript engines!
Speed-ups from 1.2× to 2×
My #ChromiumDevSummit lightning talk explains why:https://www.youtube.com/watch?v=ff4fgQxPaO0 …
-
-
Replying to @mathias
That's Nice! Could I benefit of this on node/express receiving a massive payload in a post?
1 reply 0 retweets 0 likes -
Replying to @llimacruz @mathias
I may be wrong but the payload from a request is already a string and express apps are probably just json-parsing it. So you are already done.
1 reply 0 retweets 1 like
Replying to @AndreaBogazzi @llimacruz
Andrea is correct. This technique only applies to things that are embedded within <script> or otherwise evaluated as JavaScript.
11:59 PM - 24 Nov 2019
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.