How I Made JavaScript BLAZINGLY FAST

  Рет қаралды 223,008

ThePrimeagen

ThePrimeagen

Күн бұрын

Пікірлер: 451
@uhN0id
@uhN0id 2 жыл бұрын
I'm pretty sure that Prime is talking about my code when he says garbage collection.
@mando-C137
@mando-C137 2 жыл бұрын
Holy sh**, i had to laugh out loud reading this
@ayoub.k
@ayoub.k 2 жыл бұрын
Your comment wins.
@AvenDonn
@AvenDonn 2 жыл бұрын
My collection of garbage is certainly slow. This statement is true in every possible interpretation
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
its beautiful but its garbage
@uhN0id
@uhN0id 2 жыл бұрын
@@ThePrimeagen I thought it was what's on the inner scope that counts :(
@artifishul
@artifishul 2 жыл бұрын
Big fan of the more technical stuff like this
@Psy45Kai
@Psy45Kai 2 жыл бұрын
Love auch JS deep dives. I am myself a C++ and now (partially because of you) Rust developer and like this performance stuff 😁 Since I just start using JS I like listening to JS ninjas like you are. This is much more interesting than most low level JS stuff on YT 😁 Thanks for your high octane videos ✌️
@benjaminughegbe4255
@benjaminughegbe4255 2 жыл бұрын
hey, please what's JS ninja? did he mention it in this video? ask cos I may not watch till the end 😬
@jesusgonzalez5709
@jesusgonzalez5709 2 жыл бұрын
100% agree
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
just trying to have a bit of fun out here
@pchick
@pchick 2 жыл бұрын
@@benjaminughegbe4255 it just means proficient with js
@benjaminughegbe4255
@benjaminughegbe4255 2 жыл бұрын
@@pchick oh, thanks a lot
@stasgavrylov
@stasgavrylov 2 жыл бұрын
Man, you should definitely make more of those deep-dives, you have so much knowledge to share. If you could also drop a link to this code in the description, that'd be really useful. Thanks for the great tip!
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
i will! for you, here you go github.com/ThePrimeagen/yt/blob/master/is-javascript-slow/test.js
@stasgavrylov
@stasgavrylov 2 жыл бұрын
@@ThePrimeagen 👈😎👈
@Draxen
@Draxen Жыл бұрын
Agreed, straight 🔥
@HuxleysShaggyDog
@HuxleysShaggyDog Жыл бұрын
Based
@cal3461
@cal3461 2 жыл бұрын
Awesome timing. Just learned about how Rust manages memory today so this will be a nice contrast!
@alexandersemionov5790
@alexandersemionov5790 2 жыл бұрын
I love it. Object pool is quite a popular technique in game engines to reuse npcs and so on. Please continue with this format
@lisyr4918
@lisyr4918 2 жыл бұрын
I am a junior dev, but even understanding only about 50% / 60% I am learning so much watching your videos, thanks for this incredible quality videos!
@SiisKolkytEuroo
@SiisKolkytEuroo Жыл бұрын
Is there something specific you did not understand about the video, I'd be happy to explain
@odorlessflavorless
@odorlessflavorless Жыл бұрын
@@SiisKolkytEuroo I did not even the problem statement here. Is it about tweaking the code in a way the V8 engine does not run garbage collector ?
@SiisKolkytEuroo
@SiisKolkytEuroo Жыл бұрын
@@odorlessflavorless yeah I suppose you could say that. Or, writing your code in a way that doesn't do as many allocations and doesn't leave much garbage behind
@vin1208
@vin1208 Жыл бұрын
@@SiisKolkytEuroo bro tbh i did not understand the first function, the closure i do not understand it, never used it in real life in what case scenario would that function be used so from that i barely understood the whole video, i dont even know class components and what was he trying to do with all that props1 props2 props3 and the vocalbulary he used i didnt understand most of it, im self taught so i only understand code but not terminology.
@scottiedoesno
@scottiedoesno 2 жыл бұрын
Really enjoy the technical stuff! As someone who has more than a casual relationship with JS, these kind of engaging technical analyses are super useful on a very regular basis
@blackfrog1534
@blackfrog1534 2 жыл бұрын
YES Primeee back at it with the technical stuff. For me this is your best type of content and the streams that lead up to it are so much fun!
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
yaya! I do love the technical content and i think its super fun.
@conradbuck2414
@conradbuck2414 2 жыл бұрын
I wrote a streaming regex engine and it hammers the GC pretty hard because it needs to create an object for each state it passes through, and on any real text and expression it passes through a lot. I studied its perf because I thought I'd have to pool the state objects, but instead profiling showed that I was only spending ~20% of my time doing GCs. That's because v8's generational garbage collector is optimized for the collection of objects that are small, short-lived, and have a common structure/shape. Engineers should not shy away from using those kinds of objects!
@_Aarius_
@_Aarius_ Жыл бұрын
Lots of the time people are writing code that's more IO bound than CPU bound, but it's still useful to know these tricks for the areas where you are in a hot CPU loop
@Zzznmop
@Zzznmop 2 жыл бұрын
It’s crazy that I’ve watched your channel on twitch and KZbin for years and learn something new every time I listen Thank you!
@fyndor
@fyndor 2 жыл бұрын
Hey Mr./Ms. video editor, loved the "Not sure what he wanted me to do here lol" :D I always forget most of the good content creators have an editor making these guys much better than they would be on their own. You are doing a good job btw, whoever you are.
@ffshawon1287
@ffshawon1287 2 жыл бұрын
It really worked for me after I look and try some tutorials, yours is the one that worked. Owe you a lot.
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
LETS GO!!
@jordanasghar6419
@jordanasghar6419 2 жыл бұрын
My favorite type of videos from you! I use JS all the time and see the spread pattern constantly, never thought to consider the GC impact under the hood but makes total sense!
@jamesfoley4426
@jamesfoley4426 2 жыл бұрын
I really enjoyed this video and yes I would like to see more content where you do a code review just like this. KZbin is filled with junior developer content. It is hard as an intermediate to find content that improves your skill set/skill level. I think with your knowledge base your technical review of code is extremely beneficial.
@krombopuloslincler4849
@krombopuloslincler4849 2 жыл бұрын
Please do these type of videos more. Love it
@chrishamilton1728
@chrishamilton1728 2 жыл бұрын
I'd love to see a conversation between you and the React devs about the "Immutable" philosophy. So many new objects, every single render, it hurts...
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
probably could squeeze quite a bit out on the server if they stopped
@chrishamilton1728
@chrishamilton1728 2 жыл бұрын
​@@ThePrimeagen React's whole change detection system is built around shallow diffing two objects sooooo..... But it's not a design flaw, because it makes your code *_PURE_* 😇🙏 pure garbage
@marcusrehn6915
@marcusrehn6915 2 жыл бұрын
​@@chrishamilton1728 Immutability is a sound concept that is. There are a number of ways to implement it in a far more performant manner. Sadly, javascript arrays and objects have pretty much none of the characteristics needed. There are libraries like Immutable JS, but that also falls short because no library is going to pass us an immutable list, for example after a database query. So you would have to make at least one copy of the array when converting to Immutable. How about we just skip JS on the server, at least where performance matters?
@pm1783
@pm1783 2 жыл бұрын
@@marcusrehn6915 agreed
@danielchettiar5670
@danielchettiar5670 2 жыл бұрын
@@chrishamilton1728 Imo vdom is unnecessary with modern hardware. If they took that out, react dx would be much better and they also wouldn't have to do the diffing. But that's a monumental change that's never gonna happen. Good that we have other great open source ui libs
@chrisjames278
@chrisjames278 2 жыл бұрын
Love these walk throughs. Great to have more
@MrBaudin
@MrBaudin 2 жыл бұрын
It was a great video, i would like to see more content like this. My opinion on the vid was that the setup could be shorter, the explanation of the code a bit longer and the ending was perfect! Performance is a difficult topic and these videos really help explain your thought process, please make more of them.
@leptanian
@leptanian 2 жыл бұрын
Personally I like the more technical videos you make. These walkthroughs and explanations are extremely valuable imo. And as always the editing is top-notch, Flip is the man.
@writegoodcode
@writegoodcode 2 жыл бұрын
dude love this, please make more technical content like this.
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
I thought it was fun
@writegoodcode
@writegoodcode 2 жыл бұрын
@@ThePrimeagen yup it definitely was
@writegoodcode
@writegoodcode 2 жыл бұрын
@@ThePrimeagen learnt so much, like sucking mics, etc
@benjaminkindle1841
@benjaminkindle1841 Жыл бұрын
The amount of energy this guy can summon while talking about such dry topics is truly impressive
@82TheKnocKY
@82TheKnocKY 2 жыл бұрын
I love this! This is the data based advanced stuff that no one else on KZbin really does. With realworld fang experience to back it too!
@ds_7
@ds_7 2 жыл бұрын
I loved this, I love your technical videos, MOAR CODE!!!
@SahraClayton
@SahraClayton 2 жыл бұрын
As a newbie to programming I didn't not have a clue what the Primeagen was talking about, but I still really enjoyed it.
@joaomachado9105
@joaomachado9105 2 жыл бұрын
your amazing but that editor does wonders too, props to that dude/lady whoever he/she is xD
@filipecrosk
@filipecrosk 2 жыл бұрын
Mna, these kind of content is all I need!! Thanks for sharing. Performance, performance, performance!!! Learn how to dig inside the runner and understand what parts of your code is taking longer and then debug to get it better is what everyone should learn. I know it's advanced for a lot of people, but learn how to debug is an art that we all should give more attention to. Again, I'm 1000% for more content like this!!!
@zuzuz18
@zuzuz18 2 жыл бұрын
Super high quality video. One of your best yet
@fluffykeebz
@fluffykeebz 2 жыл бұрын
2:34 -- first time I have been unable to resist the call to hit subscribe. I have subscribed, Daddy Primeagen.
@DIEZ919191
@DIEZ919191 2 жыл бұрын
DAMN! Finally I found someone who teach like a savage! Usually I find myself sleeping right after couple of minutes of *explaining* something, here in a turn, I want to break my fckn retina display like rock star breaks his guitar! BTW didn't understand how you implemented test example, but it doesn't matter!
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
hah, well, i do like teaching at break neck speed
@jogofin4939
@jogofin4939 2 жыл бұрын
I'd like to see a more in-depth breakdown of how garbage collection works as pertains to promises, and how you circumvented promises altogether. Good stuff
@daveminion6209
@daveminion6209 3 ай бұрын
good stuff, bro. keep it coming. thrnx!
@abneryang2102
@abneryang2102 Жыл бұрын
More of this plz. CI jest runs have been killing us and this was cool to watch with that in mind
@tannishkmankar3998
@tannishkmankar3998 2 жыл бұрын
IT WORKED, THANKS I'VE BEEN LOOKING FOR THIS FOREVER, BUT NO TUTORIAL COULD EXPLAIN IT AS YOU DID
@mateuszciupa8141
@mateuszciupa8141 2 жыл бұрын
that's why pure functions are advised and returning callbacks is disadvised
@wforbes87
@wforbes87 2 жыл бұрын
actual technical content about a language that no one really thinks about technically is the true performance optimization involved here
@daveisradicle
@daveisradicle 2 жыл бұрын
Great video, super smart way of showing off GC operations and how to work around them.
@dulanjala
@dulanjala 2 жыл бұрын
this is exactly the kind of content needed, deep dive into certain things...
@typeer
@typeer 2 жыл бұрын
Man I'm so grateful for you communicating this stuff in 10 min chunks so good ty sir
@codewithguillaume
@codewithguillaume 2 жыл бұрын
Dude I love this video. Got to watch it again.
@yx4292
@yx4292 2 жыл бұрын
The idea of an object pool in a library like fastly sounds like (if I understand correctly) it would be incredibly easy to misuse, because the user needs to be very careful when to release the request object. On the one hand, if you release it too early/hold onto the object for too long and (for example) use it across an await point, the JS engine may well execute another request and it could reuse the released object (and effectively write request data of the new request to the object which is still in use by the other request). Then once it goes back to executing the old request, it has all the request data from the new request. On the other hand if you forget to release the object, it "leaks".This sounds almost like manual memory management but in JS
@taragnor
@taragnor Жыл бұрын
Yeah it's exactly like manual memory management in JS. And you run into all the pitfalls of manually memory management like in C, where you can have to worry about double free and making sure you actually don't have any more pointers to the old object when you toss it back into the pool. Otherwise you're going to have some seriously weird bugs as you could have multiple parts of your program using the same object, when in reality you want those objects to be different. You really need a very good reason to want to use a scheme like this, where for whatever reason you have a very performance critical section and need to take advantage of this. Though given the pitfalls of doing this code and maintaining it, this approach should be a last resort.
@klegsy
@klegsy 2 жыл бұрын
These are the primeagen videos I enjoy the most! Keep them coming
@erikslorenz
@erikslorenz 2 жыл бұрын
This is great thanks. I usually don't worry too much about it since if I'm using JavaScript it's not in a performance = money scenario
@malachiconstant2756
@malachiconstant2756 Жыл бұрын
Real shit, thank your Prime for forcing me to care more about memory and garbage collection. Really helped me up my game as a JS developer
@thecoincritic
@thecoincritic 2 жыл бұрын
Thanks for the content. I've been working on how to rework blockchains without so much promise dependency...love these thought experiments. Best...hope the Volcano experiment works out!
@Rihsto
@Rihsto 2 жыл бұрын
Oh Prime these technical JS deep dives are fire 🔥🔥🔥
@TayTayChan
@TayTayChan 2 жыл бұрын
Yeah, tech-heavy videos are great. Code is life
@poochy661
@poochy661 Жыл бұрын
I really like these break-down videos where you show us what not to do and what to do if we want to go BLAZINGLY fast!
@skiesaboveunlimitedstargaz7316
@skiesaboveunlimitedstargaz7316 2 жыл бұрын
Awesome & Greatness!! Very Excellent point!! That's why I sometimes, do not use Promises especially if it takes a lot of time.. But it all depends on the data how you use them and put them onto the objects.
@harrybilsonia
@harrybilsonia 2 жыл бұрын
Prime!! Sending you some algorithmic clues to show more code
@aaronroethe1010
@aaronroethe1010 2 жыл бұрын
love all your videos, keep up the technical side and I love your Go content!
@m.minkov
@m.minkov 2 жыл бұрын
I have pressed all the buttons! I love these videos, I am incredibly interested in internals and how performance can be increased. Please dish out more!
@earthling_parth
@earthling_parth 2 жыл бұрын
I LOVE it! Please more technical stuff! PRIME, I AM SENDING YOU THE ALGORITHMIC SIGNALS PRIMMEEEEE!!!!
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
Let's go!!
@aburner230
@aburner230 2 жыл бұрын
+1 more deep dives, this is the first video of yours I watched, and it was great
@mekhoinfo2118
@mekhoinfo2118 2 жыл бұрын
the deepest video about JS I've ever watched lol, now I know that I have a long road before me to become like you @ThePrimegen
@martijn3151
@martijn3151 Жыл бұрын
Finally a programmer that really understands what’s happening under the hood, instead of just shouting: just use the spread operator, because it is so easy to use, and then wondering why their app is so damn slow.
@calcs001
@calcs001 2 жыл бұрын
Love this deep dive.. keep it technical, go deeeeeep sir, deeep!
@TomGeogecko
@TomGeogecko Жыл бұрын
Prime always missing the actual place of like button. Every time he says "it's there just press it" he points to some random direction :D
@za_wavbit
@za_wavbit Жыл бұрын
Node tip: `--trace_gc`, so you don't need to load your stuff in a browser just to profile it. V8's GC is also pretty interesting (in Node, at least, there's incremental sweeping in a worker, compacting is lazy) but a lot of it just comes down to common sense (don't create new objects dynamically when the data in them is static! don't throw back closures if you don't need them! use the boring-est data structure you can!). I've only rarely had to deal with GC issues in Node, but it almost always comes down to actually stupid code of my own, or actually stupid code in a library somewhere.
@alejonanez
@alejonanez 2 жыл бұрын
Man, this channel is the best 🎉
@spitefol5504
@spitefol5504 2 жыл бұрын
This is the best content I have seen by you, do more like this!
@scarlatum
@scarlatum 2 жыл бұрын
Thanks ThePrimeagen. For now I start prepare myself to listen "Why JS spread syntax so bad and slow, and why you should use our BLAZINGLY FAST lib for that" from every blog...
@jordanforbes149
@jordanforbes149 2 жыл бұрын
I understand like 50% of the words you’re saying but I understood 100% of that Fist of the North Star reference
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
life is like a box of chocolates sometimes you leave them in the sun and they get ruined
@AlphaWatt
@AlphaWatt 2 жыл бұрын
Love this stuff Prime
@lordlucan529
@lordlucan529 2 жыл бұрын
You seem to show an example of ephemeral object creation, and then move onto a test scenario that will force objects into a a more tenured generation of the heap, thereby guaranteeing the test performs poorly.
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
objects that are held for a short period time... like a request to a server in which could be several hundred milliseconds (100ms for my example)
@SimonBuchanNz
@SimonBuchanNz 2 жыл бұрын
@@ThePrimeagen the difference is that stuff like map callbacks and options objects and spread props allocate into the nursery (gen 0) and don't escape, and thus are basically free. Extremely long lived objects get bumped up to the last gen and hardly ever get checked, so they're basically free too. The pathological case is a series of middle aged objects continually getting collected after a couple of sweeps. The point is that GC sure isn't free, but you don't need to worry so much about the little bits. JS has plenty of other performance cliffs for you to worry about like accidentally checking array[-1] in one bit of code making unrelated array code 100x slower... (I think V8 has fixed that one)
@g3l0y
@g3l0y 2 жыл бұрын
Faster prime, I need this in my project
@ethSiberianDex
@ethSiberianDex 2 жыл бұрын
I love these science adjacent videos, they are like reading scientific articles but more fun
@thommccarthy1139
@thommccarthy1139 2 жыл бұрын
Normally I need to speed up KZbin coding videos. Prime may be the only channel I need to slow down. Great deep garbage heap dive.
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
yayaya!
@RafaLeyvaRuiz
@RafaLeyvaRuiz 2 жыл бұрын
I liked the video only because you send me to read the description and the way you requested was funny 😂
@velho6298
@velho6298 2 жыл бұрын
Great stuff! Interesting to listen these more technical topics.
@c__beck
@c__beck 2 жыл бұрын
I'd love to see one of these showing the Promise issue you mentioned!
@harkitnebamake
@harkitnebamake 2 жыл бұрын
So basically in a nut shell You tried to make it Blazingly Fast !!
@willl0014
@willl0014 2 жыл бұрын
I didn't understand half of it, but this was a pretty interesting video. I think i will look into this more. Thank you for sharing
@alexcasillas
@alexcasillas 2 жыл бұрын
Great video!! Though I’m extremely curious about the refactor of the promises and that performance gain, can you elaborate more on it apart from GC taking so much time? I’d love a video about this :) Great job, love your channel 🔝
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
I'll do a video on it.
@Kurimson
@Kurimson Жыл бұрын
Yea, me too. Definitely Left me wanting more 😊.
@wlidWisdom
@wlidWisdom 2 жыл бұрын
i love these king of videos .. keep going !
@carriagereturned3974
@carriagereturned3974 2 жыл бұрын
quite good amount of code, it did really well, nice explanations not... blazingly fast, BUT it is HOW to become blazingly fast!
@dontpanicyou
@dontpanicyou 2 жыл бұрын
definitely a fan of these JS deep dives.
@farrellraafi1301
@farrellraafi1301 2 жыл бұрын
I actually experimented with this when I try to port RPython to wasm. Basically leaking all the memory to do 1 full stack execution, and then shrink the memory back to the initial state in the next tick (setImmediate or setTimeout) is tons faster than applying GC algorithm and libraries even bigger one like boehm.
@cat-.-
@cat-.- 2 жыл бұрын
Primeagen: man I cannot handle short-lived object creation `for of` has left the chat
@michaelross3061
@michaelross3061 2 жыл бұрын
Yay on the technical vids/amount of code. Made happy brain chemicals
@hotscriptgg
@hotscriptgg 2 жыл бұрын
Technical videos are as cool as crazy twitch chat bashing ones. But I benefit from the technical more.
@Atriace
@Atriace 10 ай бұрын
@ThePrimeagen: In your discussion about Promises, you hinted at other performance-related issues. I share a preference for traditional function syntax over anonymous or arrow functions, mainly due to their clearer debugging and adherence to DRY principles. Similarly, I find the async/await syntax somewhat counterintuitive as it blurs the lines between synchronous and asynchronous logic. Could you elaborate on the specific issues you've encountered with Promises, particularly in terms of performance? Your insights would be greatly appreciated.
@ethernet764
@ethernet764 7 ай бұрын
Edit: nvm, in another comment, he used callback functions… Yeah, I don’t understand how promises could be converted as a series of functions, unless generators were used.
@TheKiller9696
@TheKiller9696 2 жыл бұрын
Really enjoyed this content! Would love more videos like this
@TheKiller9696
@TheKiller9696 2 жыл бұрын
@ThePrimeagen good job, you are big enough to have bots
@frankfill2050
@frankfill2050 2 жыл бұрын
just when I started to get confident in JS, this guy comes in and basically smashed it to the ground....again :D
@SomeSubhuman
@SomeSubhuman Жыл бұрын
Good. Never stop learning.
@mikebruce6790
@mikebruce6790 2 жыл бұрын
Awesome video, thanks for making this 🙏
@jaywilzon1412
@jaywilzon1412 2 жыл бұрын
Love the content. However, I would really like a quick synopsis to kick things off to kinda set the stage of where you plan on going with the piece. You move pretty quick and I tend to feel like (because I am) playing catch up a but throughout. Like I said well done though good stuff.
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
great feedback. will consider it for the promise stuff
@markclynch
@markclynch 2 жыл бұрын
Love the more technical deep dives
@GovindKumar-pe4lz
@GovindKumar-pe4lz 2 жыл бұрын
Thank you for explaining this thoroughly!
@corydanielson7369
@corydanielson7369 2 жыл бұрын
One of my favorite optimizations has been using JSON.parse(JSON.stringify(massiveJsonObject)) to speed up deep clones. chef kiss.
@ThePrimeagen
@ThePrimeagen 2 жыл бұрын
gross that definitely probably doesn't speed up the whole system, but microbench probably works
@corydanielson7369
@corydanielson7369 2 жыл бұрын
Luckily it was in UI code, so even though it made 99.9% of rendering a report a few milliseconds slower it was a magic bullet for a few massive customers where we had to render a report based on MBs of JSON. At some point _.cloneDeep recursion was assumed to be an infinite loop or unresponsive, and the browser would lock up & OS was asking users to kill it. JSON string/parse took a few seconds, and _.cloneDeep was taking >5 minutes... A user didn't report the bug until they threatened to cancel their subscription 🤦‍♂ In our case, cloning the object was done to avoid object mutations in the report affecting usage of the data elsewhere... and I didn't want to figure out if that was a valid concern.
@th34lch3m1st
@th34lch3m1st 2 жыл бұрын
I like it. Really inspiring concepts. Keep it up.
@thanhn2001
@thanhn2001 2 жыл бұрын
More please. I like this kind of stuff.
@DiscipleofYah777
@DiscipleofYah777 Ай бұрын
More JavaScript stuff like this please. Oh, the link to the example is broken. Showing an example of not using a Promise (do we use callbacks instead?) would be ideal
@sqwert654
@sqwert654 2 жыл бұрын
Huge performance gains using object pooling in my Unity games.
@TommyWilliams
@TommyWilliams 2 жыл бұрын
Grade-A chit! I'm not a fan of functional programming in everyday Javascript, but putting to work to (really) fix performance rather than do it bc you can is great
@yumyum7196
@yumyum7196 2 жыл бұрын
Please!!!! More technical videos like this one 🙏🙏🙏
@Propherex
@Propherex Жыл бұрын
I hate those garbage collectors, they always trashing all my code!
@TechdubberStudios
@TechdubberStudios 2 жыл бұрын
Yes, callbacks and function calling is faster than promises. BUT promises can be fulfilled all at once with Promises.all, without blocking the main thread! That's why we like to use 'em.
@fandimn2628
@fandimn2628 2 жыл бұрын
Still working as of today! Thank you!
@LeandroCoutinho
@LeandroCoutinho 2 жыл бұрын
Amazing stuff! For more profiling like that!!!
Is JSON Blazingly Fast or...?
9:57
ThePrimeagen
Рет қаралды 195 М.
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 98 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 12 МЛН
I Went To DEFCON!
16:25
ThePrimeagen
Рет қаралды 291 М.
Looking Under the Hood of JavaScript
6:34
ThePrimeagen
Рет қаралды 187 М.
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
Sqlite Is Getting So Good
28:52
ThePrimeTime
Рет қаралды 206 М.
How Slow Is JavaScript? | Prime Reacts
15:34
ThePrimeTime
Рет қаралды 183 М.
This Algorithm is 1,606,240% FASTER
13:31
ThePrimeagen
Рет қаралды 852 М.
My Initial Impresson Of Go
12:39
TheVimeagen
Рет қаралды 102 М.
STOP Using Classes In JavaScript | Prime Reacts
14:02
ThePrimeTime
Рет қаралды 249 М.
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 98 МЛН