@daedalus50709 months agoI could feel my brain trying to stop me writing what i knew was an infinite loop but i did it anyway. I trusted you jeff! 1451
@
@AlecThilenius9 months agoFun nerd trivia: - a single cpu core runs multiple instructions concurrently, the cpu core just guarantees that it will appear as if the instructions - a single cpu core often executes instructions totally out of order, this isnamed " out of order (o) - a single core also executes instructions simultaneously from two different threads, only guaranteeing that each thread will appear as if it ran serially, all on the same shared hardware, all in the same core. This is called and we haven' t even gotten to multi-core yet lol. I love you content jeff, the ending was gold!. ...Expand307
@
@elhaambasheerch70589 months agoLove to see jeff going in depth on this channel, would love more videos like this one. 57
@
@WolfPhoenix09 months agoThat chef analogy about concurrency and parallelism was genius. Makes it so much easier to understand the differences. 58
@
@RedlinePostal9 months agoAlso when we saythat means " one-core at a *time*" computer kernels are concurrent by default, and the program' s will actually be constantly shifting to different cpus, as the kernel manages a queue of things for the processor to do. Not too unlike the asynchronous system that javascript has, kernel will break each program you' re running into executable chunks, and has a way to manage which programs and code get more priority. ...Expand242
@
@JThompson_VI9 months agoMoments like , the short memorable description of callback functions, is what makes you a great teacher. Thanks man! 94
@
@ra2enjoyer7089 months agoIt' s a pretty good overview on how much more of a clusterfuck the code becomes once you add workers to it. And it didn' t even get to the juice. ...Expand197
@
@srejonkhan9 months agoTo see how all of your cores utilizing, you can change the graph from 'Overall utilization' to 'Logical Processor' just by right clicking on the graph -> Change graph to -> Logical Processor. .....Expand25
@
@yss649 months agoThanks for shouting out code with ryan! That channel is criminally underrated. 4
@
@BRBS3609 months agoI' d like to see a video on javascript generators and maybe even coroutines. 36
@
@nomadshiba9 months agoTalking about data oriented design always helps. 2
@
@boris---9 months agoTask Manager --> Performance tab --> CPU --> Right click on graph --> Change graph to --> Logical Processors 2
@
@ahmad-murery9 months agoIt would be nice if you right click on the cpu graph and *change graph to > logical processors*, so we can see each thread separately. thanks! 28
@
@EdgeGaming9 months agoLots of comments about memorable descriptions, shoutout to the thread summary at . Your conciseness is excellent. 1
@
@user-fed-yum9 months agoThat ending was possibly one of your best pranks ever, a new high watermark. 1
@
@7heMech9 months agoReally cool, i actually saw the other video about nodejs taking it up a notch when it came out. 1
@
@wjlee70039 months agoAlthough it' s called concurrent, schedulers still can only work on one task at a time. It will delegate a certain amount of time to each task and switch . ...Expand5
@
@AntonisTzorvas9 months agoAside from the outstanding quality, this ending was quite funny and hilarious! Keep it up, your content is top. 1
@
@avsync-live9 months agoLittle known fact, you can also do dom related operations on another thread. You have to serve it from a separate origin and use the header, and load the script in an iframe. But you can still communicate with it using postmessage, and avoid thread blocking with large binary transfers using chunking. This is great for stuff that involves video elements and cameras. i use it to move canvas animations (that include video textures) off the ui thread, and calculating motion vectors of webcams. ...Expand37
@
@deneguil-16189 months agoJust a heads up for your cpu; the 12900k doesn' t have 8 physical cores, it indeed has 16, 8 performance and 8 efficiency cores, the performance cores. ...Expand76
@
@kiprasmel9 months agoThe `threads` package makes working with threads much more convenient. It also works well w/ typescript. 1
@
@junama9 months agoGood vdeo! next time change the cpu graph with right click to see each threat graph. hope it helps! 16
@
@dzhaniivanov58379 months agoI watched a similar video early this year, but your way to deliver content is amazing, keep going.
@
@Bell_4203 months agoThe cook analogy was great and i now understand.
@
@maxijonson9 months agoMy brain: dont run it 8 years of programming: dont run it the worker thread registering my inputs to the console as i type it: dont run it jeff: run it. *runs it*. 7
@
@Ihavetoreturnsomevideotapes9 months agoAyo, was learning event loop and had a bit of confusion about performance b/w single and multithreading and jeff just posted the video at the right time.
@
@AlexEscalante9 months agoWow! Just yesterday i was watching some videos about worker threads because i will use them to speed up the ui in my current development. 1
@
@TeaBroski9 months agoIt' s like you read my client' s requirement and came into support. 3
@
@yournerdiness31359 months agoThis video is the embodiment of " why do something easily when you could spend hours unsuccessfully making it faster" 4
@
@DranKof9 months agoI tried the while loop thing and somehow my computer became sentient. Y' all should try that out. 2
@
@abhijay_hm9 months agoWith the amount of time i' ve spent on this video because of the while loop, even the algorithm knows who my favourite youtuber is. 1
@
@hyper_channel9 months agoa small detail at your i9 has 16 physical cores not 8. Only half of them have hyperthreading (because there are 2 types of physical cores in that cpu). That's why it has 24 threads instead of 32 .....Expand8
@
@robertjif63379 months agoThanks, now i know what script i should include in my svgs. 1
@
@zeta_meow_meow3 months agoSeeing my cpu throttle and core usage rise in realtime was impresive:
@
@PlayWithNiz9 months agoI' m thinking out loud here, but have a genuine question - could you use workers combined with something like husky to do allchecks at once? for example, i may have a largetest suite, followed by a large e2e test suite, along with code quality checks and so on. All of which are ran in sequence potentially taking upwards of a few minutes to complete. could workers be used to run these jobs together at once?. ...Expand1
@
@DumbledoreMcCracken9 months agoEach value should be a random value, and you should sum them in the end to ensure the compiler / interpreter does not optimize all the work away because it detected that you never used the values. 1
@
@MrSovr9 months agoYea tried everything, still frozen. Any additional advice for fixing it? 1
@
@HedleyLuna9 months agoI did use this back in 2018. I don' t know how much it improved, but error handling was painful. Also, when you call postmessage( v8 will serialize apart from that, you should never share data between threads, that' s an anti-pattern. ...Expand1
@
@MegaMech9 months agoA single x86 core can actually run more than one command at a time. And the n64 can run 1. 5 commands at a time when it uses a branch delay slot. 1
@
@wusluf9 months agoAdding more cores might still provide gains in a vm scenario depending on the hypervisor. As long a your vm isn' t provisioned all physical cores the. ...Expand
@
@RajitRoy_NR9 months agoWhat are some of the useful libraries which help or use workers? Like partytown or comlink. 1
@
@duckysolucky49619 months agoThank you, now i' m stuck in the vim and in the browser. 3
@
@Sowagware9 months agoDo you want to run() the jobs or double the workers and give it to the next run()?
@
@adaliszk9 months agoYou can also pass initial data without needing to message the thread to start working, however, that one i feel like its better to use for initialization like connecting to a database.
@
@ninjaasmoke9 months agoPeople watching on phone: that level of genjutsu doesnt work on me.
@
@JeremyAndersonBoise9 months agoSpawning workers in node is not new, but support for web workers in browsers is comparatively new. Good shit man.
@
@JeremyThille8 months agoNiice we have the exact same machine! And thanks for the video!
@
@VileEnd9 months agoLove it, we are already doing that with our lambdas - cause why not use the vcores when you got them. 1
@
@ko-Daegu9 months agoconcurrency incorporates parallelism what you should is asynchronism
@
@Bossslime9 months agoI remember when i first learned workers, i didnt realize k could use a separate js file so i wrote all of my code in a string, it was just a giant string that i coded with no ide help. That was fun. 1
@
@tracevandyke20099 months agoOk so i did the while( true ) loop and after unplugging my computer and plugging it back in, it still didnt unfreeze my browser. Should i try deleting system32 next?
@
@earthling_parth9 months agoI' m struggling really hard with some of our developers using nodejs workers in containers inenvironment. I' m on the don' t have in-depth knowledge of nodejs. In a container based cloud environment, does it still makes sense to get the number of cores of the host os/machine and then create that many workers for doing some compute intensive task? This was utilizing way too much cpu and hitting against their cpu limits so i told them to manually set the number of workers to 4 or 6. Is this the correct approach? Can someone with more knowledge about nodejs and it' s best practices in containerized environment help me out here? Thanks in advance. ...Expand1
@
@jack1713809 months agoI wonder if there are things like mutex locks to help with theof shared resources? 1
@
@iandrake46839 months agoI ran ur codz and mi coputer melted. Weer do i submit claim?
@
@DarthNithin9 months agoI wish you showed the cpu usage on each logical processor on task manager instead of the overview.
@
@rmlmax9 months agomy tab is still not responding. What should I do?
@
@lionbryce101019 months agoWoulda been cool if you set it to show core usage on taskmgr. 1
@
@Xe0549 months agoFireship, the " s" sounds in your video sound really harsh. Consider using a de-esser plugin or a regular compressor plugin and your stuff will sound fantastic. Cheers.
@
@markopolo22249 months agoMan i been wanting something about workers for so long.
@
@akashrajpurohit979 months agobro really doubled it and gave it to the next thread
@
@MuhammadbinYusrat9 months agoDoesn' t out of order execution try to divide work to multiple threads on its own?
@
@TonyAlcast9 months agoI'm still amazed at how you find such accurate images as the one at
@
@AbdulRehman-ee8zc9 months agoI was aware my browser will stop working due to while(1) then also i did it now you tell me how to fix it for internet explorer because closing i am using windows 7. ...Expand
@
@Quamsi9 months agoI have had hours long lectures in college level programming classes on the differences between concurrency and parallelism and the first 3 minutes of this. ...Expand33
@
@zimin50769 months agoI have a 8 core cpu, i open 8 tab with 8 while true loop, will my computer die?
@
@AchwaqKhalid9 months agoDude the 12900k has 16 physical cores (8p+8e) and a total of 24 threads since only the p cores have hyper-threading 1
@
@joebgallegos9 months agoI recently did a little side project where i needed to use a worker in a web app. The gist of the project is given a winning lottery number, how many quick picks or random tickets would it take to finally hit.
@
@hasipTimurtas5 months agoAfter the loop my laptop turned to fireship, is this how you increase your fans?
@
@wlockuz44679 months agoI thought worker threads were virtual threads. You learn something new everyday! 2
@
@BoloH.9 months agoI once made a volume rendering thingie with three. Js and it really, really benefited from web workers, especially interpolation between z slices. 4
@
@jugurtha2929 months agoin , how is swift that slow, its static and compiled and does not use garbage collection.
@
@dave60129 months agoMr jeff will you do one on creating a websocket server in node js?
@
@fruitsnack18129 months agoWait, what about async/await and concurrency. Is it same thing in his picture?
@
@JellySword89 months agoIf using 16 workers causes 100% cpu usage than how is the os still able to do anything? Is it because each thread is also using concurrency?
@
@Martin-kt8sz9 months agoDid anyone find a way to force close a tab on arc? every time i get an infinite loop i have to restart the whole browser.
@
@bruc15559 months agoPlease help, i have been trapped here for 5 years, the browser still won' t let me out. 1
@
@nullternative9 months agoI just recently experimented with the offscreen canvas handling rendering on a separate worker thread. Pretty cool. 5
@
@gr.43809 months agoLove how you tell us to leave a comment if it' s locked like we can even do that.
@
@MysteryMixerMan9 months agoAre there any major baseline costs that need to be considered when spinning up workers? Start time, considerable ram etc) thanks for the content.
@
@jimbowers12989 months agoUnlimited view times! Awesome! What a great video! 2
@
@nadavgover60179 months agoMy browser is still stuck with watch time overflow error. Send help.
@
@dan-cj1rr9 months agoNo clue if this could be an interesting video, but teach us about how to deploy on different environment ( ex: testing, production) as a junior i always. ...Expand
@
@landscapesandmotion9 months agoElixir is faster than i thought and getting faster with the new jit compiler improvements.
@
@aravind.a9 months agoHow it is different from cluster module?
@
@DamonMedekMusic9 months agoI' ve used the web worker api to filter multiple arrays at once and it' s okay but it is very unintuitive to use and it could definitely be improved. ...Expand1
@
@0Smile09 months agoHello, it' s been 23 years. My chrome tab is still not responsive. please send help.
@
@fatzzke9 months agoHuh your i9 has 16c/24t but it still spikes to 100% at 16threads. Does windows not count the e-cores or does it go to 100% because hyperthreading on the same operation usualy doesnt work.
@
@RegalWK9 months agoEvery async thing you do goes to micro task or task queue, and every single one of them is executed on different thread, and once its done it goes back a web workes once are done also goes to main thread to the callstack. ...Expand5
@
@themax2go8 months agoUnplugged puter didn't work (fix issue with unresponsive browser). kekw
@
@AnwarulIslamYT9 months agoJavascript is referred to high level, single threaded, garbage collected, interpreted || jit compiled, prototype based, dynamic language with a, non-blocking event loop. 1
@
@victorpinasarnault91359 months agoIs workers api the same thing as web workers?
@
@Emil_969 months agoIf every thread is independent from each other e. G. With the browser window having its own thread, how come that if you encounter an issue in one thread,. ...Expand
@
@mohitnagpal9 months agoI was asked the same question for an internship interview in 2021 whether js is multi threaded or not and i said yes because of worker threads. The interviewer said no, it is not and hung up the phone: 1
Related videos for PROOF JavaScript is a Multi-Threaded language:
- a single cpu core runs multiple instructions concurrently, the cpu core just guarantees that it will appear as if the instructions - a single cpu core often executes instructions totally out of order, this isnamed " out of order (o)
- a single core also executes instructions simultaneously from two different threads, only guaranteeing that each thread will appear as if it ran serially, all on the same shared hardware, all in the same core. This is called
and we haven' t even gotten to multi-core yet lol. I love you content jeff, the ending was gold!. ...Expand 307
data oriented design always helps. 2
thanks! 28
i use it to move canvas animations (that include video textures) off the ui thread, and calculating motion vectors of webcams. ...Expand 37
next time change the cpu graph with right click to see each threat graph.
hope it helps! 16
8 years of programming: dont run it
the worker thread registering my inputs to the console as i type it: dont run it
jeff: run it.
*runs it*. 7
for example, i may have a largetest suite, followed by a large e2e test suite, along with code quality checks and so on. All of which are ran in sequence potentially taking upwards of a few minutes to complete.
could workers be used to run these jobs together at once?. ...Expand 1
that level of genjutsu doesnt work on me.
what you should is asynchronism
now you tell me how to fix it for internet explorer because closing i am using windows 7. ...Expand
every time i get an infinite loop i have to restart the whole browser.
thanks for the content.
it' s been 23 years. My chrome tab is still not responsive.
please send help.