Liste des Groupes | Revenir à cl python |
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.
Les messages affichés proviennent d'usenet.