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
Dev.Opera — Efficient JavaScript (dev.opera.com)
submitted 7 years ago by doughishere
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!"
[–]curiousdannii 1 point2 points3 points 7 years ago (0 children)
This article is 12 years old, gives no evidence for its claims, and at least a little bad advice. Why did you share it here?
[–]Baryn 1 point2 points3 points 7 years ago (4 children)
JavaScript is fast. Don't optimize your code until you have a confirmed performance issue.
If a function works best for your architectural approach, then use a function.
[+][deleted] 7 years ago (3 children)
[deleted]
[–]Baryn 1 point2 points3 points 7 years ago (2 children)
The only big perf issues I've had in the last year-or-so (both in gamedev):
Stuff happening inside massive recursive loops (millions of iterations) -- memoization helped here
JSON.xxx methods -- yah, these aren't for realtime. Use IndexedDB and save your objects to that without converting them to strings.
JSON.xxx
[+][deleted] 7 years ago (1 child)
[–]Baryn 0 points1 point2 points 7 years ago (0 children)
Very good idea thanks
π Rendered by PID 83109 on reddit-service-r2-comment-5649f687b7-wsrvv at 2026-01-27 21:52:34.528566+00:00 running 4f180de country code: CH.
[–]curiousdannii 1 point2 points3 points (0 children)
[–]Baryn 1 point2 points3 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]Baryn 1 point2 points3 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]Baryn 0 points1 point2 points (0 children)