@tiagdvideo

Great comparison - this deserves a lot of views!

@infrapale

I have been waiting for this type of comparison. Thanx Kevin! I have done initial selections between C and Python  several times. My main arguments have been: Files, sound or strings -> Python. Complex logic, multiple interfaces -> C. Hardware testing -> Python.  The application is to be maintained by a person with limited programming skills -> Python.  For the Python implementations I still need to choose between CircuitPython and MicroPython.

@Jononor

MicroPython and C is not an either-or choice! Many of the MicroPython modules are implemented in C (the rest are in plain Python) - and one can install third party C modules as well. There are two flavors - external C modules, which have to be included at build time of the MicroPython firmware - and native modules, which can be installed at runtime, by adding a .mpy file to the filesystem.  By combining C modules with Python, we can get the best of both worlds - the convenience and rapid iteration of Python, and the fast execution and low memory usage of C.
For example, I have written an ML/DSP library for MicroPython using native modules, called emlearn-micropython.

@Spartacus69

Honestly, being able to edit micropython right in the terminal and be able to test things without waiting to compile is amazing. Micropython for development is a win in my books especially for IOT. If I need the speed then I just convert the micropython code to C for the final deployment. I suppose it's best to just know your tools and use what fits best. Great video amigo! I love the content.

@1870movie

Thank you for sharing this knowledge. I am currently trying to learn viper and asm_thumb but there is little to no documentation to support this important part of MicroPython. Therefore, please make a series similar to how Life with David did for PIO.

Also, I noticed at 44:20 of your video that MicroPython performed 65536 calculations per second. This number, 65536 is the same as 0xFFFF. When I see an exact number like 65536, this makes me suspicious there is an anomaly with the test that needs further investigation to understand if there is something that is artificially biasing the results.

@TooSlowTube

24:33 You don't need to click the Verify button, unless you don't intend to upload it afterwards.  Just click the Upload button.  It then does the same thing, but without compiling it twice.

I agree it compiles when there's no need to though, e.g. after failing to upload because of forgetting to set the port correctly.  There's no Stop button either.  Despite what I've read, the only reliable way to stop it compiling, when I know I've made a mistake, is to exit the IDE, which doesn't help much because it takes a while to start up again.

@chrisl2656

Q. At 26:44, those results are soooo close to 65535 (2^16 - 1), could it be that we’re just measuring the frequency of some time-slicing behaviour in the python runtime? I’d’ be curious to see if adding more work (or removing everything but the count increment) causes the results to change.

@edgarbonet1

The C++ statement

    float result = (1234.56 * 7890.12) / 345.67;

is not a good benchmark: the right hand side being constant, it is evaluated at compile-time. You end up with just an assignment of a constant to be done at run time.

Wait, no, not event that! As the variable `result` is not used anywhere in the sketch, it gets optimized-out by the compiler. So the whole “calculation” benchmark gets optimized into this:

    while (millis() < endTime) {
        calculations++;
    }

I don't know whether the Python interpreter can do this kind of optimizations, but the C++ compiler can absolutely not miss them.

@IW2MXEdiego

Try to initialize Serial to 115200 and compare the C++ result. The Serial.print() for debug take a lot of waste time

@Bob_Burton

Which programming language did you use for your smackdown scores ?

After comparing File systems the score was 7/5 then one comparison later after Development Workflow the score was 7/8

Something fishy is going on here

@dougblanding8791

pico is my favorite microcontroller (running MicroPython)

@chuckcrizer

TLDR: micropython is easier than C++, especially for noobs. C/C++ a lot faster and more powerful.

@Andrew-ud3xl

Due to micropython being slower, would micropython on a 600mhz teensy be fast enough to use for a speeduino, I think it would need to fire the spark exactly every 2.3 milli seconds for each cylinder alternatively?

@kriit24

C++ is much better to look at and is more logical

@TooSlowTube

This is the first I've heard that there's an official Arduino IDE for MicroPython.  Does it do CircuitPython too?  Is there a legitimate reason for CircuitPython to exist, or should Adafruit have just contributed board support packages for MicroPython instead?

@handlewithoutsuitcase

Can we work with an RTOS using microPython?

@Yakroo108

👍👍👍

@cutemartinj

25:00