Python, C++, and Assembly: Side-by-Side Comparison

preview_player
Показать описание
DIGITAL SOFTWARE HUB
Which programming language should you learn: Python, C++, or Assembly? 🚀 In this short, we put Python, C++, and Assembly side by side for a direct comparison. Understand the key differences in syntax, performance, and usage for beginners and advanced developers alike. Whether you're a beginner learning Python, an intermediate C++ coder, or an advanced Assembly developer, this video has insights for you! #Coding #Programming
@xmdi0

#Python
#CPP
#Assembly
#Programming
#CodingComparison
#LearnCoding
#CodingLanguages
#PythonVsC++
#AssemblyLanguage
#SoftwareDevelopment
#CodeChallenge
#CodingLife
#TechComparison
#CodeBattle
#HighLevelVsLowLevel
#ProgrammingLanguages
#DeveloperLife
#CodingShorts
#BeginnerCoder
#AdvancedCoding

#SoftwareTools #BeginnerSoftware #SoftwareDevelopment #CodingForBeginners #ProductivityTools #Software2024 #LearnToCode #DevTools #ProgrammingTools #TechTip
#FreeDevTools #SoftwareDevelopment #ProgrammingTools #OpenSource #DeveloperEssentials #CodeEditor #VSCode #GitHub #APITesting #Postman #Docker #JavaDevelopment #FigmaDesign #JupyterNotebooks #Notion #DeveloperWorkflow #Coding #TechTools #SoftwareEngineering

Free software development tools,top developer tools,VS Code,GitHub,free programming tools,open-source software,software tools,beginner software tools,top software tools,coding for beginners,2024 software tools,best software for beginners,developer tools,software development,programming for beginners,Visual Studio Code,tech tools for beginners,free software tools,collaboration tools,GitHub for beginners,how to use Slack,Visual Studio Code tutorial Python, C++, Assembly, programming comparison, Python vs C++, Assembly language, coding languages, coding comparison, software development, learn coding, high-level programming, low-level programming, code performance, programming for beginners, developer tools, programming shorts
Рекомендации по теме
Комментарии
Автор

Its insane how C's runtime is equals to X86 Assembly's .

ecruz
Автор

I'm pretty sure you could save some time by first: not putting "cmp" into the loop, or even better: changing up your algorithm to use ECX with JNZ/JZ. I haven't done this stuff for a pretty long while now, I may be in the wrong. Also, try to use a normal linker instead of "gcc", I'm pretty sure it plagues the program with stdlib stuff, slowing down loading times.

colaspider
Автор

I think you could save a second by dropping the semicolons in python

dalulu
Автор

In python you could have avoided the semicolons and the str() function, as print already transforms the arguments if you pass an int, this will make programming time faster and execution time too, cause now the print(str(numPrimes)) is transforming numPrimes twice, first with the str(), and it then parses it again with print().
The diference of time is mainly because the python code is just 147 characters and the c++ code is 206 characters long, meaning it is at least 1, 4 times more time consuming to write it on c++. I tried it my self, and it took me 48 seconds to do the well form written python code (147 characters) and 1 minute 12 seconds for your c++ code (pretty neat btw), if you get the difference is 1, 5 times more for c++, which is close to that ideal time of 1, 4, its a bit off mainly because c++ uses more doble key charcters (requiring shift a lot, mainly on the brackets and semicolons).
Your comparison is alr, taking into acc you added 10 characters more, which makes the length difference of the code 1, 3 times longer for c++, and you took 1, 4 times longer, it seems alr the time differences, but as I said, you lost a couple seconds on that python code with the semi colons and str() function.
But yeah, writting c++ and python if you know them well youll have the same CPM in both, just that c++ takes usually between 25% to 50% more characters to get the same problem solved.
And with python there are many things you can do to make the code run faster, I made a prime searching algorithm based on the sieve of erathostenes and I was able to make it run just 6 times slower than C/C++, taking into account it would have taken me arround 50% more time writting it and that run time didnt matter, it was a much better option to do it on python.
So if you want to get a problem solved fast, use Python, if you want fast code use C/C++ or now Rust which is really popular, and if you want to KYS use ASMx86 or COBOL if you dare to learn that language.

dtar
Автор

bro literally using AI to copy other's video 💀

deptrycrecker