Has anyone measured how fast a pico can do things running Python?Yes, Python is interpreted.
Like, to start, wiggling a port pin as fast as possible?
I think the micro Python is an interpreter.
john larkin <jl@650pot.com> wrote:
Has anyone measured how fast a pico can do things running Python?
Like, to start, wiggling a port pin as fast as possible?
I think the micro Python is an interpreter.Yes, Python is interpreted.
I found https://wellys.com/posts/board-language_speed/
I think the performance of Micropython and Circuitpython should be
almost equal.
The nice thing is that you can test your code interactively in the
Python interpreter.
On 8 Feb 2024 08:10:20 GMT, "Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de> wrote:
john larkin <jl@650pot.com> wrote:
Has anyone measured how fast a pico can do things running Python?Yes, Python is interpreted.
Like, to start, wiggling a port pin as fast as possible?
I think the micro Python is an interpreter.
I found https://wellys.com/posts/board-language_speed/
I think the performance of Micropython and Circuitpython should be
almost equal.
The nice thing is that you can test your code interactively in the
Python interpreter.
Cool. We just did a MicroPython loop to raise and lower a port pin 4
times, brute force inline code, as fast as we could. One up/down cycle
takes about 14 microseconds on a Pico, with some jitter.
We'll repeat it in c. I'm guessing that will be 20x faster.
On 8 Feb 2024 08:10:20 GMT, "Peter Heitzer" ><peter.heitzer@rz.uni-regensburg.de> wrote:I did a quick test yesterday evening using this few lines of code:
john larkin <jl@650pot.com> wrote:
Has anyone measured how fast a pico can do things running Python?Yes, Python is interpreted.
Like, to start, wiggling a port pin as fast as possible?
I think the micro Python is an interpreter.
I found https://wellys.com/posts/board-language_speed/
I think the performance of Micropython and Circuitpython should be
almost equal.
The nice thing is that you can test your code interactively in the
Python interpreter.
Cool. We just did a MicroPython loop to raise and lower a port pin 4
times, brute force inline code, as fast as we could. One up/down cycle
takes about 14 microseconds on a Pico, with some jitter.
We'll repeat it in c. I'm guessing that will be 20x faster.
john larkin wrote:
Cool. We just did a MicroPython loop to raise and lower a port pin 4
times, brute force inline code, as fast as we could. One up/down cycle
takes about 14 microseconds on a Pico, with some jitter.
We'll repeat it in c. I'm guessing that will be 20x faster.
I did a quick test yesterday evening using this few lines of code:
I got 83 kHz.
Peter Heitzer wrote:Although the PIO code could be written in MicroPython with the
john larkin wrote:
Cool. We just did a MicroPython loop to raise and lower a port pin 4
times, brute force inline code, as fast as we could. One up/down cycle
takes about 14 microseconds on a Pico, with some jitter.
We'll repeat it in c. I'm guessing that will be 20x faster.
I did a quick test yesterday evening using this few lines of code:
I got 83 kHz.
I think if you want the fastest cycle time, you'd use the RP2040's PIO
state machine, and probably get 62MHz without overclocking, but then
that's not really testing MicroPython ...
the PIO code could be written in MicroPython with the decorator @rp2.asm_pio().
Peter Heitzer wrote:
the PIO code could be written in MicroPython with the decorator
@rp2.asm_pio().
I should get a Pico to play with ...
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 371 |
Nodes: | 16 (2 / 14) |
Uptime: | 36:56:37 |
Calls: | 7,932 |
Calls today: | 2 |
Files: | 12,998 |
Messages: | 5,805,537 |