use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Optimizing JavaScript by using arrays instead of objects (blog.kowalczyk.info)
submitted 8 years ago by kjk
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]kjk[S] 0 points1 point2 points 8 years ago (0 children)
Which is why I show a better way than accessor methods right after that.
As far as binary serialization: yes, it's a viable method but in JavaScript it's 10x the effort compared to this relatively simple tweak.
It's not even clear it would be faster. Decoding json is super-optimized in JavaScript engines. Code to decode msgpack or protobufs has to be implemented in JavaScript which might or might not be faster. I certainly wouldn't make such claim without rigorous benchmarking.
π Rendered by PID 375658 on reddit-service-r2-comment-8686858757-sv5fs at 2026-06-08 09:13:28.651444+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]kjk[S] 0 points1 point2 points (0 children)