Jack,
I've never soiled my hands with an MSWin10 machine, though I doubt the OS matters much.
Python is an interpreted language, so much slower than C.
Parameters to functions can be passed as a malleable list or dictionary,
and that function might return an integer sometimes and a string at others.
You can do all sorts of wacky things with objects in Python.
Whereas C is strongly typed, the compiler knows exactly what to expect and can optimize for it.
Python vs C execution times will vary wildly.
Much depends on coding style.
As a wild guess, maybe 100x?
On the other hand, much of the stuff that one would think should be slow
is handed off to C code within the core language, or to library functions written in C.
For example, if doing some nasty math, you might be using the numPy library for
matrix manipulations, and the python code is just occasionally mothering it along.
In that case, it's as fast as C.? Because it is C.
The RPi-Pico has a clock 10 times faster than the Nano, and uses 32 bit ARM cores.?
A python port of Raduino code to the RPi-Pico might possibly run about as fast as the Nano with C.
Would be interesting to try.
But I think the Raduino should remain in C.
Jerry.
toggle quoted message
Show quoted text
On Sun, Mar 21, 2021 at 07:16 PM, Jack, W8TEE wrote:
Any idea of the runtime difference between C and Python on an MS Win10 machine?