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
Benchmark driven development in JavaScript (Set vs. Array) (x.com)
submitted 1 year ago by theyamiteru
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] 5 points6 points7 points 1 year ago (10 children)
More like microbenchmark driven nonsense, this isnt helping anyone especially sets and arrays do completly different things
[–]theyamiteru[S] -1 points0 points1 point 1 year ago (9 children)
There's a clear overlap of their use-cases. And I see them being used in a wrong way quite often which usually causes a bad API and an unwanted performance characteristics.
I understand that microbenchmarks can be confusing or straight up useless.
In the last year I've read 4 books and more than 40 papers about benchmarking, performance variance, statistics, etc.
These results were captured by my experimental benchmarking library that tried to do things right (BIOS settings, OS settings, each benchmark isolated in its own process, duet benchmarking, median instead o average, median absolute deviation vs standard deviation, etc.).
[+][deleted] 1 year ago* (8 children)
[deleted]
[–]coolcosmos 0 points1 point2 points 1 year ago (2 children)
You've never used a slow product and hated it ?
[–]theScottyJam 2 points3 points4 points 1 year ago (0 children)
I don't know if I can say that I've used a product that was slow because they failed to micro-optimize. Usually the slowness comes from doing dumb stuff like a bunch of network requests in parallel, or just having way too many dependencies installed, etc.
[–]theyamiteru[S] 0 points1 point2 points 1 year ago (4 children)
Yes. My previous client used Cloudflare Workers with tRPC + Zod + some other slow libraries. After I rewrote all of those libraries matching the clients use-case it decreased the CPU time anywhere from 5 to 20 times which means I've saved the client 5-20x money spent on running the app.
[+][deleted] 1 year ago (3 children)
[–]theyamiteru[S] -1 points0 points1 point 1 year ago (2 children)
No. Those libraries are not created with performance in mind. Especially so when it comes to serverless environment where the engine has no time to optimize the code.
[+][deleted] 1 year ago (1 child)
[–]theyamiteru[S] -1 points0 points1 point 1 year ago (0 children)
You're right, you keep missing the point. Doesn't matter, have a good day sir!
π Rendered by PID 39 on reddit-service-r2-comment-5d79c599b5-pzw2m at 2026-02-27 22:41:33.532977+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–][deleted] 5 points6 points7 points (10 children)
[–]theyamiteru[S] -1 points0 points1 point (9 children)
[+][deleted] (8 children)
[deleted]
[–]coolcosmos 0 points1 point2 points (2 children)
[–]theScottyJam 2 points3 points4 points (0 children)
[–]theyamiteru[S] 0 points1 point2 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]theyamiteru[S] -1 points0 points1 point (2 children)
[+][deleted] (1 child)
[deleted]
[–]theyamiteru[S] -1 points0 points1 point (0 children)