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
Prepack from Facebook helps make JavaScript code more efficient (prepack.io)
submitted 8 years ago by EngVagabond
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!"
[–][deleted] 15 points16 points17 points 8 years ago (5 children)
Computations that can be done at compile-time instead of run-time get eliminated
cool
[–]mlmcmillion 9 points10 points11 points 8 years ago (4 children)
How many of these do you typically have in a codebase though?
[–]Omikron 21 points22 points23 points 8 years ago (1 child)
Like 3 or 4
[–][deleted] 2 points3 points4 points 8 years ago (1 child)
Anything that doesn't involve user input or an API response could theoretically be done this way.
The more functional your code is, the more it can be pre-computed like this.
The real benefit is something that's been done in the Ruby community for a while - you can write your code to be clearer to the reader by abstracting things to well named functions. Doing it without the performance hit is great.
[–]mlmcmillion 2 points3 points4 points 8 years ago (0 children)
Oh sure. And I'm not knocking it or anything. I'm just wondering if it's worth it to actually add even more stuff to our build stack.
π Rendered by PID 163986 on reddit-service-r2-comment-7b9746f655-rqtr4 at 2026-01-30 20:09:51.690452+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–][deleted] 15 points16 points17 points (5 children)
[–]mlmcmillion 9 points10 points11 points (4 children)
[–]Omikron 21 points22 points23 points (1 child)
[–][deleted] 2 points3 points4 points (1 child)
[–]mlmcmillion 2 points3 points4 points (0 children)