Which Python System is affected? (Was: What does the Async Detour usually cost)

Liste des GroupesRevenir à cl python 
Sujet : Which Python System is affected? (Was: What does the Async Detour usually cost)
De : janburse (at) *nospam* fastmail.fm (Mild Shock)
Groupes : comp.lang.python
Date : 23. Jun 2025, 23:48:20
Autres entêtes
Message-ID : <103cljk$16i0p$1@solani.org>
References : 1 2 3 4 5
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0 SeaMonkey/2.53.21
Hi,
I tested this one:
Python 3.11.11 (0253c85bf5f8, Feb 26 2025, 10:43:25)
[PyPy 7.3.19 with MSC v.1941 64 bit (AMD64)] on win32
I didn't test yet this one, because it is usually slower:
ython 3.14.0b2 (tags/v3.14.0b2:12d3f88, May 26 2025, 13:55:44)
[MSC v.1943 64 bit (AMD64)] on win32
Bye
Mild Shock schrieb:
Hi,
 I have some data what the Async Detour usually
costs. I just compared with another Java Prolog
that didn't do the thread thingy.
 Reported measurement with the async Java Prolog:
  > JDK 24: 50 ms (using Threads, not yet VirtualThreads)
 New additional measurement with an alternative Java Prolog:
 JDK 24: 30 ms (no Threads)
 But already the using Threads version is quite optimized,
it basically reuse its own thread and uses a mutex
somewhere, so it doesn't really create a new secondary
 thread, unless a new task is spawn. Creating a 2nd thread
is silly if task have their own thread. This is the
main potential of virtual threads in upcoming Java,
 just run tasks inside virtual threads.
 Bye
 P.S.: But I should measure with more files, since
the 50 ms and 30 ms are quite small. Also I am using a
warm run, so the files and their meta information is already
 cached in operating system memory. I am trying to only
measure the async overhead, but maybe Python doesn't trust
the operating system memory, and calls some disk
 sync somewhere. I don't know. I don't open and close the
files, and don't call some disk syncing. Only reading
stats to get mtime and doing some comparisons.

Date Sujet#  Auteur
14 Jun 25 * Does Python Need Virtual Threads? (Posting On Python-List Prohibited)17Lawrence D'Oliveiro
14 Jun 25 +* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)10Paul Rubin
15 Jun 25 i`* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)9Lawrence D'Oliveiro
15 Jun 25 i `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)8Paul Rubin
15 Jun 25 i  `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)7Lawrence D'Oliveiro
15 Jun 25 i   `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)6Paul Rubin
15 Jun 25 i    `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)5Lawrence D'Oliveiro
15 Jun 25 i     `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)4Paul Rubin
16 Jun 25 i      `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)3Lawrence D'Oliveiro
16 Jun 25 i       `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)2Paul Rubin
17 Jun 25 i        `- Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
14 Jun 25 `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)6Mild Shock
23 Jun 25  `* async I/O via threads is extremly slow (Was: Does Python Need Virtual Threads?)5Mild Shock
23 Jun 25   `* What does stats = await asyncio.to_thread(os.stat, url) do? (Was async I/O via threads is extremly slow)4Mild Shock
23 Jun 25    `* What does the Async Detour usually cost (Was: What does stats = await asyncio.to_thread(os.stat, url) do?)3Mild Shock
23 Jun 25     `* Which Python System is affected? (Was: What does the Async Detour usually cost)2Mild Shock
24 Jun 25      `- Schachner, Joseph was the Big Moron [September 2021 16:30] (Was: Which Python System is affected?)1Mild Shock

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal