C vs Python Speed Test #cpp #python #programming #code

preview_player
Показать описание
In this video, we are going to do a Python vs C Speed Test.

🧑🏻‍💻 My AI and Computer Vision Courses⭐:

💵Channel Member for help with projects, private discord, and exclusive perks:

I'll be doing other tutorials alongside this one, where we are going to use C++ for Algorithms and Data Structures, and Artificial Intelligence. The purpose of this tutorial and channel is to build an online coding library where different programming languages and computer science topics are stored in the YouTube cloud in one place.

Feel free to comment if you have any questions about the things I'm going over in the video or just in general, and remember to subscribe to the channel to help me grow and make more videos in the future. :)

Tags for the video:
#cpp #python #performance #speed
Рекомендации по теме
Комментарии
Автор

Well you can actually optimize python a lot by putting a few zeros at the end of
number += 1

cnarozdemir
Автор

Gotta love seeing the potential of languages! But we can never get too caught up in speed. It’s always about the right tool for the right job

WhyNotProgram
Автор

The comparison was made between C and Python, not C++ and Python.

elirol
Автор

If somebody believe Python can run faster than C++. He or she doesn't understand software development.

jorgheinecke
Автор

Compilers skip useless loops. Use the iteration to do an operation for example to print and then compare them. We don't write useless for loops

sedatmehmed
Автор

C++ for fast run like it but python very good for internet manipulation and settings

omhosjo
Автор

You could use a jit compiler in python, then the results would be probably way closer

luisafonso
Автор

I compared JS and Python with the same code example and JS just humiliated Python with the same speed as C!

medio_cre
Автор

Switched part of my softwares from python to golang with dll and the speed difference was insaneee

AB-cdgd
Автор

Could you please make a video with for loops alternatives in python?
It seems hard to avoid them in some OpenCV applications but im not sure what would be an alternative other than just run OpenCV with C++

_Bernardo
Автор

Now let's see a comparison with Perl, and with hand-optimised assembler.

starpawsy
Автор

You said you were gonna use c++ but you used C. Or do they both have the exact same compile and runtime?

opus_X
Автор

Me, a gentoo user :"where is the optimization flags"

nastykerb
Автор

Just spin wait alone is not a good test. The best test is finding data a large file. Surprisingly, the differences between languages will be smaller, probably much smaller. Unless, C/C++ code uses special bare metal tricks to speed up memory access.

Автор

C++ is 20x faster at this activity*. It varies a lot depending on what you’re doing, C++ is more like 4-40 times faster depending on varying circumstances.

noddle
Автор

these programs are not the same unless an integer multi precision library for the number increment is used.

abcdxcxd
Автор

Wait, why don't you just put number=i, since i is already counted just use i as number ?

yudhobaskoro
Автор

А еще в новых версиях c++ есть возможность указать компилятору что const переменная может посчитаться во время компиляции

gameworld
Автор

Should use c or c++ for creating artificial neural network, not python.

KyyTyy
Автор

This video is dated 18 days after the release of Python 3.11 which is supposed to be much faster than previous releases. Is that the version you're running here?

SameAsAnyOtherStranger
join shbcf.ru