Комментарии:
Just get some more ram or a bigger cpu
ОтветитьThere is no slow pyhon code.
It's just Python
Easy, just dont use python. Only compiled languages are worth it
ОтветитьDiagnose show Python code, really? It's Python, it's designed to be slow.
ОтветитьBruh this didint help at all :(
Im already threading it...
All python code is slow.
ОтветитьLançou a braba!
ОтветитьI wanted to see a comparison of both versions of the errant function but that wasn't done.
ОтветитьWhat are the advantages of SnakeViz over KCacheGrind?
Ответить"I know it looks pretty simple " he says...
ОтветитьYour channel is amazing! thanks a lot for such excellent and useful content!
ОтветитьGreat video thanks! What is the difference between running cProfile.Profile() vs cProfile.run()?
ОтветитьThank you for making such a high quality video. Amazing.
ОтветитьMasterpiece! Thanks for your effort, I managed to get my hands to keyboard from other side of sofa just to write this comment.
ОтветитьAfter running it with my project I've found out that 95% of the time is spent on ~:0(<method 'acquire' of '_thread.lock' objects>). I.e. it doesn't analyze the code run in the threads.
ОтветитьThere’s no such thing as fast python 🙂
ОтветитьQuestion: How to make a python program run faster
Answer: Rewrite that in basically any other language
Nice tricks you put here. Thanks a lot.
ОтветитьYay my console application is now working with 1000+ FPS. My monitor is 60Hz so it doesnt really matter. I only needed 60 FPS.
ОтветитьThank you so much for contributing to the community in such a wonderful way!
ОтветитьDoes asyncio.gather() actually allow for them to complete in whatever order they complete in? I feel like in my testing, it blocks in the order of the tasks in the list. I know that asyncio.as_completed() was made for that purpose.
Ответитьwhenever i see someone use perf_counter(), i find a CoreyMS student :).
Ответитьawesome
ОтветитьAll python is slow.
Ответитьthey seriously named it 'cumtime'?
ОтветитьHm. So asyncio is good. I'm a little stuck understanding how that's not parallel processing as in different threads.
ОтветитьSo when this sends out an async request, it's like this?:
send request > check for response > send request > check for response > send request ...
instead of:
send request > wait for response > send request > wait for response ...
Add threading or multiprocessing and boom 💥
ОтветитьI always use threading using loop requests
ОтветитьThank you very much!!! Your advice helped me out!
Ответитьif you made a course I would buy it, you are amazing!
ОтветитьThis is a great video. Wow. Thanks!
ОтветитьLiked and subscribed!! That was helpful
ОтветитьCould you make a video explanining asynchronous and parallel programming technically? I see many others just give a broad overview of how to use the library, not explain what it does under the hood. Great content!
Ответитьvery useful, thanks
Ответить<3
ОтветитьMan!
You create amazing content! Thanks for all.
Hey there,have you heard of line_profiler? It's an amazing package that will document exactly how much time each line in your code takes. I use it similarly to these features, but it is far easier to implement. (Just import at the top and add a @profile decorator to any functions you want to be profiled)
ОтветитьNice.
ОтветитьOpinion: JS has got its async/await much better & easier to use.
This is the equivalent JS code for the htmls:
const htmls = await Promise.all(
urls.map(async (url) => {
const res = await fefch(url);
return await res.text();
})
);
lmao cumtime
ОтветитьMarvelous :D
ОтветитьFunny thing is, i made a project that does the 3n1 check for a long range of number, and save the step and result in a file... I wrote in both c++ and python, surprisingly python took half as much time... i guess python is better in writing optimized c++ code than me😅😅
ОтветитьBrilliant! Thank you.
Ответитьyou probably dont mention a critical thing. when i copy your code into my spyder it doesnt work and throws an error "AttributeError: __enter__" .
ОтветитьHey, Im curious. If you retrieve you URLs using map instead. Would that also take so long?
Ответить