Re: patch for mmap and friends

2023-01-13 Thread Matt Wette
On 1/13/23 4:49 PM, Matt Wette wrote: Please consider this patch for adding mmap(), munmap() and msync()  to libguile/filesys.c.  Included is update for posix.texi and test file mman.test. Once included, feature 'mman should be #t. Matt Please add the attached file:

patch for mmap and friends

2023-01-13 Thread Matt Wette
Please consider this patch for adding mmap(), munmap() and msync()  to libguile/filesys.c.  Included is update for posix.texi and test file mman.test. Once included, feature 'mman should be #t. Matt From 6c944174d35d43f87340c8199d47f3f088fa6ca7 Mon Sep 17 00:00:00 2001 From: Matt Wette Date:

Re: [PATCH] Add 'bytevector-slice'.

2023-01-13 Thread Ludovic Courtès
Maxime Devos skribis: > On 13-01-2023 12:32, Ludovic Courtès wrote: >>> IIUC, if you use bytevector-slice iteratively, say: >>> >>> (let loop ((bv some-initial-value) >>> (n large-number)) >>>(if (> n 0) >>>(loop (bytevector-slice bv 0 (bytevector-length bv)) >>>

[PATCH] Document R7RS bytevector functions

2023-01-13 Thread lloda
Hi Right now the manual just mentions (scheme base), but not the contents. This patch at least makes sure that at least the bytevector-related R7RS functions appear in the index. The patch documents a first group of purely bytevector functions and a second group of binary I/O that are not

Re: fibers,questions about thread id and mutation of vectors

2023-01-13 Thread Maxime Devos
for (i=start; i<=stop; i++) { /* i is private by default */ scm_init_guile(); scm_call_1( func , scm_from_int(i) ); IIUC, you are calling scm_init_guile once per index, whereas calling it once per thread would suffice. For better performance, I propose doing it once per thread.

Re: [PATCH] Add 'bytevector-slice'.

2023-01-13 Thread Maxime Devos
On 13-01-2023 12:32, Ludovic Courtès wrote: IIUC, if you use bytevector-slice iteratively, say: (let loop ((bv some-initial-value) (n large-number)) (if (> n 0) (loop (bytevector-slice bv 0 (bytevector-length bv)) (- n 1)) bv)) you will end up with a

Re: [PATCH] Add 'bytevector-slice'.

2023-01-13 Thread Ludovic Courtès
Hi, Maxime Devos skribis: > The only thing missing for me, is a procedure > 'bytevector-slice/read-only' and 'bytevector-slice/write-only', then I > could throw the module implementing the wrapping in Scheme-GNUnet and > the overhead incurred by wrapping away. I did consider the read-only

Re: fibers,questions about thread id and mutation of vectors

2023-01-13 Thread Damien Mattei
i made some test of openMP and Guile with Guile 3.0.8.99-f3ea8 on MacOS M1 and Linux Intel because i was not sure of the performances. I find a problem on Linux the code is slower (could be a factor of 5) with openMP and in Mac OS the gain is is of 100% (divide by 2) or 15% depending of

Re: [EXT] [PATCH] Add 'bytevector-slice'.

2023-01-13 Thread lloda
> On 12 Jan 2023, at 23:27, Ludovic Courtès wrote: > > lloda skribis: > >>> On 11 Jan 2023, at 18:37, Thompson, David wrote: >>> >>> On Wed, Jan 11, 2023 at 12:34 PM Ludovic Courtès wrote: What could be convenient though is ‘bytevector-copy’ (no bang), which would combine