TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

I made JSON.parse() 2x faster

87 pointsby radexover 2 years ago

8 comments

i-use-nixos-btwover 2 years ago
See, this is the difference between a productive engineer and a purist.<p>You are a productive engineer. You see a fast library that needs a different encoding, so your first thought is to add a transcoding step and make a 2x gain in a short timeframe.<p>I am a purist. I see a fast library that needs a different encoding, and my first thought is “ok, I’ll fork that library and make it work with UTF-16 natively”. 24 months later I’ll be found, bearded down to my kneecaps, staring at the bottom of a bottle of scotch, mumbling a mixture of curse words and “PowerPC”. But Id get a 2.05x speedup eventually, so…
评论 #35030315 未加载
Waterluvianover 2 years ago
This is delightful!<p>Maybe next you can make the object spread operator faster ;). I was recently bitten by it in a hot loop, thinking it was generally syntactic sugar. Turns out that if I know all the property names in an object, it’s far far faster to just assign them all manually.
评论 #35025377 未加载
评论 #35025797 未加载
评论 #35026203 未加载
KomoDover 2 years ago
I quite enjoyed this blog post to be honest
评论 #35024229 未加载
aabdelhafezover 2 years ago
<a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20230304124849&#x2F;https:&#x2F;&#x2F;radex.io&#x2F;react-native&#x2F;json-parse&#x2F;" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20230304124849&#x2F;https:&#x2F;&#x2F;radex.io&#x2F;...</a>
bblackwoodover 2 years ago
Great blog post! As someone who isn&#x27;t particularly familiar with javascript internals (or many language internals for that matter), this was really easy to follow and a lot of fun.
MichaelNozbeover 2 years ago
Speed is the ultimate User Experience. Especially when it comes to exchanging JSON data which is what apps do all the time these days. Great job!
randyrandover 2 years ago
This is a great blog post with few comments. Impressive work.<p>Did they merge it?
评论 #35024223 未加载
mfbx9da4over 2 years ago
Nice little rabbit hole you ended up in!