Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

GIVE: Support the helpless victims of computer error.


computers / comp.sys.raspberry-pi / Re: Pi Pico Python speed

SubjectAuthor
* Pi Pico Python speedjohn larkin
`* Re: Pi Pico Python speedPeter Heitzer
 `* Re: Pi Pico Python speedjohn larkin
  +- Re: Pi Pico Python speedBryan
  `* Re: Pi Pico Python speedPeter Heitzer
   `* Re: Pi Pico Python speedAndy Burns
    `* Re: Pi Pico Python speedPeter Heitzer
     `* Re: Pi Pico Python speedAndy Burns
      `- Re: Pi Pico Python speedThe Natural Philosopher

1
Pi Pico Python speed

<vcp7sipg1ef996ciln46bjgf97rtg5nr0a@4ax.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9113&group=comp.sys.raspberry-pi#9113

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!border-2.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 07 Feb 2024 20:21:09 +0000
From: jl@650pot.com (john larkin)
Newsgroups: comp.sys.raspberry-pi
Subject: Pi Pico Python speed
Date: Wed, 07 Feb 2024 12:21:04 -0800
Message-ID: <vcp7sipg1ef996ciln46bjgf97rtg5nr0a@4ax.com>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 5
X-Trace: sv3-LyzVUGdiyUZYREesAJ/fvWb8fYBCBjjiA4YZ3D6KUMmfFAB9SuciVwB2MTboMmGQOpsLUxPrmG8QOFD!37y6ENVUtYJBd+HBQXXKIQwP98OyPJD1DT1zl/haDYknk2czCgj+6j1/SMHC9As8t/rwTnDqz9kN!W+1Kqg==
X-Complaints-To: www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: john larkin - Wed, 7 Feb 2024 20:21 UTC

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.

Re: Pi Pico Python speed

<l2jgjcFjjkcU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9126&group=comp.sys.raspberry-pi#9126

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: peter.heitzer@rz.uni-regensburg.de (Peter Heitzer)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pi Pico Python speed
Date: 8 Feb 2024 08:10:20 GMT
Lines: 15
Message-ID: <l2jgjcFjjkcU1@mid.individual.net>
References: <vcp7sipg1ef996ciln46bjgf97rtg5nr0a@4ax.com>
X-Trace: individual.net nh8t4+2GxzvAG8jCZY7hMAaIOhzmV+g1ylrnEfteW0wV9ryWLoLXsOHAq1
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:CIK9anr++Ug6mQqHUau6q1xFlzU= sha256:8uO2BgefCwfiQmIdjlDNc1Swy9fn6myeGJErVzPbLkA=
User-Agent: tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (Linux/4.19.0-26-amd64 (x86_64))
 by: Peter Heitzer - Thu, 8 Feb 2024 08:10 UTC

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.

--
Dipl.-Inform(FH) Peter Heitzer, peter.heitzer@rz.uni-regensburg.de

Re: Pi Pico Python speed

<4sqasihspiggr57t75cdtscmemttglrhs9@4ax.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9142&group=comp.sys.raspberry-pi#9142

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!69.80.99.22.MISMATCH!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 09 Feb 2024 00:19:58 +0000
From: jl@650pot.com (john larkin)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pi Pico Python speed
Date: Thu, 08 Feb 2024 16:19:51 -0800
Message-ID: <4sqasihspiggr57t75cdtscmemttglrhs9@4ax.com>
References: <vcp7sipg1ef996ciln46bjgf97rtg5nr0a@4ax.com> <l2jgjcFjjkcU1@mid.individual.net>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 21
X-Trace: sv3-JXrqDrkD5t/+T7ZHV2DhfgxvvveMlpA5HRQVsadMn4G4P4nnIS1+KTEAkHPpcOfFZGf1YTuc/hfe/iI!AKXIT5UaGv+MrTl+oF/fWR0LnrNu1Q0rjmWLM7Ee/Ezt17tnnKwSbBaB5ZR13lXYkd//z5+1eIZ2!tHxZGQ==
X-Complaints-To: www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: john larkin - Fri, 9 Feb 2024 00:19 UTC

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?
>>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.

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.

Re: Pi Pico Python speed

<uq4dnj$2g435$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9145&group=comp.sys.raspberry-pi#9145

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: pbyabmle@4wrd.cc (Bryan)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pi Pico Python speed
Date: Fri, 9 Feb 2024 00:37:50 -0500
Organization: wereboar.com
Lines: 26
Message-ID: <uq4dnj$2g435$1@dont-email.me>
References: <vcp7sipg1ef996ciln46bjgf97rtg5nr0a@4ax.com>
<l2jgjcFjjkcU1@mid.individual.net>
<4sqasihspiggr57t75cdtscmemttglrhs9@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 9 Feb 2024 05:37:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="77076965c32b19e51b83ae50466ab3cb";
logging-data="2625637"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/SSnjrE6gyEUOu6PPy47dp"
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101
Thunderbird/60.9.1
Cancel-Lock: sha1:fW2z/TImbSakLq+gF5guGAwEXnY=
Content-Language: en-US
In-Reply-To: <4sqasihspiggr57t75cdtscmemttglrhs9@4ax.com>
 by: Bryan - Fri, 9 Feb 2024 05:37 UTC

On 2/8/2024 19:19, john larkin wrote:
> 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?
>>> 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.
>
> 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.
>

A little off topic, but do you have any suggestions as to good "I don't
know squat and I'm old and it doesn't make sense" learn MicroPython
resources?

Re: Pi Pico Python speed

<l2m5cnF35vmU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9146&group=comp.sys.raspberry-pi#9146

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: peter.heitzer@rz.uni-regensburg.de (Peter Heitzer)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pi Pico Python speed
Date: 9 Feb 2024 08:17:27 GMT
Lines: 39
Message-ID: <l2m5cnF35vmU1@mid.individual.net>
References: <vcp7sipg1ef996ciln46bjgf97rtg5nr0a@4ax.com> <l2jgjcFjjkcU1@mid.individual.net> <4sqasihspiggr57t75cdtscmemttglrhs9@4ax.com>
X-Trace: individual.net FCSRYOw2nKbotOaYB2uQsAXajASyNpqJ0SF7XPelS0TrPswlMA26CwNwKV
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:Sc81mMwCXXer1umnC15j6CbuWn4= sha256:hM5MOPJiUCLnWYql/gAfA8WiaNB7RfZHNELMZWvcmTQ=
User-Agent: tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (Linux/4.19.0-26-amd64 (x86_64))
 by: Peter Heitzer - Fri, 9 Feb 2024 08:17 UTC

john larkin <jl@650pot.com> wrote:
>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?
>>>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.

>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:

from machine import Pin
led=Pin(0,Pin.OUT)
switch=Pin(1,Pin.IN,Pin.PULL_UP)
while switch.value(): led.toggle()

GPIO0 was an output driving a LED. On GPIO1 I connected a momentary switch
to ground. On the output pin I got about 41 kHz until the switch was
pressed. With an endless loop:
while True: led.toggle()
I got 83 kHz.
I used Micropython v. 1.20; the Pico run at 125 MHz.
I also noticed some jitter. Normally one would not create a rectangle signal
this way but use a PWM channel for that task.

--
Dipl.-Inform(FH) Peter Heitzer, peter.heitzer@rz.uni-regensburg.de

Re: Pi Pico Python speed

<l2mic2F4l2oU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9153&group=comp.sys.raspberry-pi#9153

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@andyburns.uk (Andy Burns)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pi Pico Python speed
Date: Fri, 9 Feb 2024 11:58:58 +0000
Lines: 18
Message-ID: <l2mic2F4l2oU1@mid.individual.net>
References: <vcp7sipg1ef996ciln46bjgf97rtg5nr0a@4ax.com>
<l2jgjcFjjkcU1@mid.individual.net>
<4sqasihspiggr57t75cdtscmemttglrhs9@4ax.com>
<l2m5cnF35vmU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net Gw2nRVNLuz2eQOms1EoteQhoIZ3wjw+9uOs9e+OWuQAUScqCJv
Cancel-Lock: sha1:Rr0BYNYFEQd6nSimoh/W1r2hNiQ= sha256:WrArXPj6bksGnPjkss+BtSvv4pyybfN1QpSuQEyJrEQ=
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <l2m5cnF35vmU1@mid.individual.net>
 by: Andy Burns - Fri, 9 Feb 2024 11:58 UTC

Peter Heitzer wrote:

> 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 ...

Re: Pi Pico Python speed

<l2miv2F5j0kU2@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9155&group=comp.sys.raspberry-pi#9155

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.nntp4.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: peter.heitzer@rz.uni-regensburg.de (Peter Heitzer)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pi Pico Python speed
Date: 9 Feb 2024 12:09:06 GMT
Lines: 22
Message-ID: <l2miv2F5j0kU2@mid.individual.net>
References: <vcp7sipg1ef996ciln46bjgf97rtg5nr0a@4ax.com> <l2jgjcFjjkcU1@mid.individual.net> <4sqasihspiggr57t75cdtscmemttglrhs9@4ax.com> <l2m5cnF35vmU1@mid.individual.net> <l2mic2F4l2oU1@mid.individual.net>
X-Trace: individual.net E/YQJkA+hq7iMLLApMNyswprBFz5JZ15BNzCR2bJ9/atDRKlrtiz+vUTvk
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:1kI8oQMkLsmlljsrkqa6fOTwC8I= sha256:X0tXce++PZL5MBx/ZOItb2bx3NyZ6gEqGj9TXd3gZmA=
User-Agent: tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (Linux/4.19.0-26-amd64 (x86_64))
 by: Peter Heitzer - Fri, 9 Feb 2024 12:09 UTC

Andy Burns <usenet@andyburns.uk> wrote:
>Peter Heitzer wrote:

>> 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 ...
Although the PIO code could be written in MicroPython with the
decorator @rp2.asm_pio().

--
Dipl.-Inform(FH) Peter Heitzer, peter.heitzer@rz.uni-regensburg.de

Re: Pi Pico Python speed

<l2mkieF4l2oU2@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9156&group=comp.sys.raspberry-pi#9156

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!newsfeed.endofthelinebbs.com!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@andyburns.uk (Andy Burns)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pi Pico Python speed
Date: Fri, 9 Feb 2024 12:36:29 +0000
Lines: 8
Message-ID: <l2mkieF4l2oU2@mid.individual.net>
References: <vcp7sipg1ef996ciln46bjgf97rtg5nr0a@4ax.com>
<l2jgjcFjjkcU1@mid.individual.net>
<4sqasihspiggr57t75cdtscmemttglrhs9@4ax.com>
<l2m5cnF35vmU1@mid.individual.net> <l2mic2F4l2oU1@mid.individual.net>
<l2miv2F5j0kU2@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net qRc5bLISN5wpAMLGZ2zPawGXikrunptqIGys2Id3/M+I5jCwpk
Cancel-Lock: sha1:6LWjkXXQtXerp0GH415EVrLEs0w= sha256:zm7+AFueEyTUEGVOwRNp2ZOyUOcN+AJWjf270jORxXY=
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <l2miv2F5j0kU2@mid.individual.net>
 by: Andy Burns - Fri, 9 Feb 2024 12:36 UTC

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 ...

Re: Pi Pico Python speed

<uq5aob$2let3$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9158&group=comp.sys.raspberry-pi#9158

  copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Pi Pico Python speed
Date: Fri, 9 Feb 2024 13:53:15 +0000
Organization: A little, after lunch
Lines: 22
Message-ID: <uq5aob$2let3$2@dont-email.me>
References: <vcp7sipg1ef996ciln46bjgf97rtg5nr0a@4ax.com>
<l2jgjcFjjkcU1@mid.individual.net>
<4sqasihspiggr57t75cdtscmemttglrhs9@4ax.com>
<l2m5cnF35vmU1@mid.individual.net> <l2mic2F4l2oU1@mid.individual.net>
<l2miv2F5j0kU2@mid.individual.net> <l2mkieF4l2oU2@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 9 Feb 2024 13:53:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="31e377f3eca17bfb2df6ecdcd632bba3";
logging-data="2800547"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19HyKxB8vB2PRxWgHu3R03XaivehxQhqYM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:B6ypmB2xSSmIQaQtYrUuK1C2QDY=
In-Reply-To: <l2mkieF4l2oU2@mid.individual.net>
Content-Language: en-GB
 by: The Natural Philosop - Fri, 9 Feb 2024 13:53 UTC

On 09/02/2024 12:36, Andy Burns wrote:
> 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 ...
>
>
The worst part is getting a toolchain working: and understanding the
APIs. If you don't want to use Python.

Coding the little fuckers is pretty simple after that.

--
"What do you think about Gay Marriage?"
"I don't."
"Don't what?"
"Think about Gay Marriage."

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor