Тёмный

BEST Practises For SIMPLE Benchmarks In Python 

Indently
Подписаться 224 тыс.
Просмотров 9 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@Indently
@Indently 9 месяцев назад
I also wanted to mention: NEVER follow a benchmark you saw on social media blindly. ALWAYS perform your own tests and make sure you do adequate research on the topic. timeit is fun for performing simple benchmarks, but you might want to look into something more powerful like profiler.
@Smart_Coder7
@Smart_Coder7 9 месяцев назад
Why do you always provide So Useful Knowledge ?
@flamendless
@flamendless 9 месяцев назад
Loop test of only 10 range is not ideal to show the perf benefits of using list comprehension over append
@Indently
@Indently 9 месяцев назад
There's so much more to consider in these tests, you're right. Even in my simple example it would have been nice to: 1) Increase the range 2) Test the best case scenarios 3) Test the worst case scenarios and I'm sure there's much more to keep into consideration as well.
@thoughtful_monkey1042
@thoughtful_monkey1042 9 месяцев назад
Thank you. I think timeit is the second step. One probably should start with some profiler, identify bottlenecks, then optimise them the way described in the video. I would also like to hear your idea how one can benchmark memory usage by the code.
@Carberra
@Carberra 9 месяцев назад
Top tip of the day: Pythons can be made faster by placing them on rocket-powered skateboards.
@RuneJohannesen
@RuneJohannesen 9 месяцев назад
Please make a video on iterators! Would love to know more about them.
@SkyFly19853
@SkyFly19853 9 месяцев назад
Python is one of the best for video game development. C and C++ create way too many bugs and counter productivity. And Python can be optimized by many ways.
@ickebins6948
@ickebins6948 9 месяцев назад
This comment makes no sense on so many levels... Good job.
@SkyFly19853
@SkyFly19853 9 месяцев назад
@@ickebins6948 If so, why bother making a comment ? I guess my comment makes sense since you responded ? Don't get me wrong... Just curious.
@ickebins6948
@ickebins6948 9 месяцев назад
@@SkyFly19853 I replied because it is generalized nonsense without any justification... And people should see it for what it is. If I would support your statement, you would get a thumbs up and thats all.
@SkyFly19853
@SkyFly19853 9 месяцев назад
@@ickebins6948 Generalized nonsense ? Do you even know what you are talking about ? Who creates more bugs ? Python or C languages ?
@Indently
@Indently 9 месяцев назад
It's a trick question, the developer creates the most bugs xD
Далее
Python's 5 Worst Features
19:44
Просмотров 110 тыс.
Nightmare | Update 0.31.0 Trailer | Standoff 2
01:14
Просмотров 574 тыс.
5 Useful Python Decorators (ft. Carberra)
14:34
Просмотров 104 тыс.
How is this Website so fast!?
13:39
Просмотров 626 тыс.
3 .NET "Best Practices" I Changed My Mind About
10:16
Просмотров 104 тыс.
10 Python Comprehensions You SHOULD Be Using
21:35
Просмотров 153 тыс.
This Algorithm is 1,606,240% FASTER
13:31
Просмотров 846 тыс.
This Is Why Python Data Classes Are Awesome
22:19
Просмотров 811 тыс.
Massively Speed-Up Python Code With Numba Compilation
16:28
5 Good Python Habits
17:35
Просмотров 579 тыс.
5 Really Cool Python Functions
19:58
Просмотров 64 тыс.
Nightmare | Update 0.31.0 Trailer | Standoff 2
01:14
Просмотров 574 тыс.