unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Olivier Dion via General Guile related discussions <guile-user@gnu.org>
To: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: [ANN] Guile-Parallel 1.0.0 released
Date: Sat, 31 Dec 2022 15:31:34 -0500	[thread overview]
Message-ID: <87pmbzpb6h.fsf@laura> (raw)
In-Reply-To: <f2cdfcc7-8d69-7fd3-5a65-0ff269c9eb4f@posteo.de>

On Sat, 31 Dec 2022, Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> wrote:

> Maybe I can already make use of it in coming AoC puzzles.

Any sort of feeback is welcome!

> I am currently a bit confused about where the line is between a good use-case 
> for guile-parallel and guile-fibers. Or whether they could work well together or 
> the people making them should work together ; )

I haven't use fibers a lot, but I think that if you ever need to handle
asynchronous I/O, for now you should stick with fibers.  Also, fibers
was written by peoples that have a way better understanding of Guile
internal then I do, so I would expect it to be better in some areas.  It
also use epoll(2) instead of select(2), which is way better for events
listening.  I will make the change once Guile has native support for
epoll(2).  I currently only use select(2) for listening on
timerfd_create(2) timers to handle sleeps of userspace threads, so the
impact is marginal.

Where I can see a clear difference is in the primitives offered to the
users.  Fibers works with channels and follows a paradigm à la
Concurrent ML while Parallel works with traditionnal primitives like
barriers, mutexes, semaphores, etc.  Parallel also aims at providing
useful parallel algorithms to the users.  e.g. vector sort.

The ultimate goal of Parallel is to make communication between userspace
threads and kernel threads transparent.  All synchronization primitives
should work for all threads types and for different schedulers.

I think that one can quickly use Parallel without modifying too much its
code base to make it work, e.g. by replacing (rnrs sorting) vector-sort
with (parallel vector) parallel-vector-sort.  You can also replace the
usage of (ice-9 futures) with (parallel futures).  The latter scale
better from my benchmarks.

-- 
Olivier Dion
oldiob.dev



  reply	other threads:[~2022-12-31 20:31 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-31  3:55 [ANN] Guile-Parallel 1.0.0 released Olivier Dion via General Guile related discussions
2022-12-31  9:06 ` Damien Mattei
2022-12-31 19:58 ` Zelphir Kaltstahl
2022-12-31 20:31   ` Olivier Dion via General Guile related discussions [this message]
2023-01-02 16:13     ` Greg Troxel
2023-01-02 17:59       ` Maxime Devos
2023-01-02 20:45         ` Greg Troxel
2023-01-02 21:24           ` Olivier Dion via General Guile related discussions
2023-01-02 23:56             ` Olivier Dion via General Guile related discussions
2023-01-03 10:57               ` Damien Mattei
2023-01-03 21:40                 ` guile-fibers timerfd_create bug (was: Re: [ANN] Guile-Parallel 1.0.0 released) Maxime Devos
2023-01-03 22:38                   ` Damien Mattei
2023-01-03 22:43                     ` Maxime Devos
2023-01-04  1:28                     ` Olivier Dion via General Guile related discussions
2023-01-03 22:06                 ` [ANN] Guile-Parallel 1.0.0 released Olivier Dion via General Guile related discussions
2023-01-03 22:29                   ` Damien Mattei
2023-01-02 20:28       ` Olivier Dion via General Guile related discussions
2023-01-08 13:30     ` Zelphir Kaltstahl
2023-01-08 14:44       ` Olivier Dion via General Guile related discussions
2023-01-08 15:17         ` Zelphir Kaltstahl
2023-01-08 15:55           ` Olivier Dion via General Guile related discussions
2023-01-08 15:59             ` Zelphir Kaltstahl
  -- strict thread matches above, loose matches on Subject: below --
2023-01-03 16:47 dsmich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmbzpb6h.fsf@laura \
    --to=guile-user@gnu.org \
    --cc=olivier.dion@polymtl.ca \
    --cc=zelphirkaltstahl@posteo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).