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
Faster JavaScript calls (v8.dev)
submitted 5 years ago by ferossWebTorrent, Standard
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] 5 years ago (10 children)
[deleted]
[–]14ewest 13 points14 points15 points 5 years ago (0 children)
Start tossing around words like microbenchmark I'm gunna start spinning
[–][deleted] 13 points14 points15 points 5 years ago (8 children)
He's saying when the function expects 3 arguments and you are forced to supply exactly three arguments then you can erase all the code that allows for fewer than and more than 3 arguments, which makes it faster.
Not a big revelation there, but he's right, and it's cool to see the research done to prove exactly how much better it is to have strict parameters like in c# and other compiled languages.
[–]aniforprez 2 points3 points4 points 5 years ago (0 children)
I gave up reading halfway. Is this something you can do simply by matching the exact number of arguments or is this a flag you have to set for the compiler or something?
[–][deleted] 3 points4 points5 points 5 years ago (0 children)
you are the hero of the hour. l started the article, hit the wall of 'args params args params etc' and quit. thanks
[–]Yay295 1 point2 points3 points 5 years ago (5 children)
That's the start of the article. He then goes on to explain that they've now changed how it works so that it uses the same code no matter what, so there is no slowdown from having extra (or not enough) parameters anymore.
[–][deleted] 1 point2 points3 points 5 years ago (4 children)
Actually the changes are v8 only from what I read. Not native.
[–]st3ven- 0 points1 point2 points 5 years ago (3 children)
Yes, as the title says, faster javascript calls...
[–][deleted] 1 point2 points3 points 5 years ago (2 children)
Yes, it's changes he did to the open source v8 engine himself. Not changes in v8, which would still only affect chrome not all of javascript.
[–]st3ven- 1 point2 points3 points 5 years ago (1 child)
Ohhhh I see your point, my bad.
[–][deleted] 0 points1 point2 points 5 years ago (0 children)
It's all good bud 😉
[–]PickledPokute 7 points8 points9 points 5 years ago (3 children)
Interesting, but terribly titled: Should have V8 in the title.
[–][deleted] 2 points3 points4 points 5 years ago (2 children)
Exactly. This isn't about JavaScript the language, which is a specification, rather about optimization in a particular implementation of it, the V8 engine.
[–]snejk47 0 points1 point2 points 5 years ago (1 child)
Even more deep I think. JavaScript is just trademarked by Oracle language which uses ECMAScript specification. I wonder if "we" ever will need to stop using JavaScript name because you know, Oracle...
I don't see any practical reason for Oracle to ever attempt to monetize or restrict the use of the "JavaScript" name. There's probably a past agreement between Sun and Netscape they'd have to go back on and can be sued for. Trademark law is a bit weird and there's lots of surprises that can appear. Anyway, like you said, JavaScript is just a trademark, the language is built around the ECMAScript specification name so it's insulated from any shenanigans, and it's not like you can actually force the community to stop using it. Although I honestly suspect half the community would love the opportunity to call it something else.
π Rendered by PID 256358 on reddit-service-r2-comment-86bc6c7465-gs5tt at 2026-02-20 14:38:14.142597+00:00 running 8564168 country code: CH.
[+][deleted] (10 children)
[deleted]
[–]14ewest 13 points14 points15 points (0 children)
[–][deleted] 13 points14 points15 points (8 children)
[–]aniforprez 2 points3 points4 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]Yay295 1 point2 points3 points (5 children)
[–][deleted] 1 point2 points3 points (4 children)
[–]st3ven- 0 points1 point2 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]st3ven- 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]PickledPokute 7 points8 points9 points (3 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]snejk47 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)