Re: For a cheaper ‘bytevector->pointer’

2019-11-26 Thread Andy Wingo
Hi :) On Mon 25 Nov 2019 23:03, Ludovic Courtès writes: > Andy Wingo skribis: > >> Honestly I would prefer not to do this. If I understand correctly, the >> problem is in FFI calls -- you have a bytevector and you want to pass it >> as a pointer. In that case the "right" optimization is to av

Re: For a cheaper ‘bytevector->pointer’

2019-11-25 Thread Ludovic Courtès
Hello! Andy Wingo skribis: > Honestly I would prefer not to do this. If I understand correctly, the > problem is in FFI calls -- you have a bytevector and you want to pass it > as a pointer. In that case the "right" optimization is to avoid the > scm_tc7_pointer altogether and instead having a

Re: For a cheaper ‘bytevector->pointer’

2019-11-25 Thread Andy Wingo
On Sun 24 Nov 2019 11:52, Ludovic Courtès writes: > A few days ago David was explaining on #guile how ‘bytevector->pointer’ > was generating too much garbage for his use case. An idea we came up > with was to embed the pointer object in the bytevector. > > The patch below does that but it leads

Re: For a cheaper ‘bytevector->pointer’

2019-11-24 Thread Amirouche Boubekki
Le dim. 24 nov. 2019 à 11:53, Ludovic Courtès a écrit : > > Hello! > > A few days ago David was explaining on #guile how ‘bytevector->pointer’ > was generating too much garbage for his use case. An idea we came up > with was to embed the pointer object in the bytevector. I would be very happy to

For a cheaper ‘bytevector->pointer’

2019-11-24 Thread Ludovic Courtès
Hello! A few days ago David was explaining on #guile how ‘bytevector->pointer’ was generating too much garbage for his use case. An idea we came up with was to embed the pointer object in the bytevector. The patch below does that but it leads to segfaults because I’m guessing there’s generated b