[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mmap for guile
From: |
Ludovic Courtès |
Subject: |
Re: mmap for guile |
Date: |
Thu, 21 Jul 2022 11:14:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
Hi,
Maxime Devos <maximedevos@telenet.be> skribis:
> Ludovic Courtès schreef op ma 04-07-2022 om 12:09 [+0200]:
>> I don’t think the optimizer makes any such assumption, except for
>> literal bytevectors.
>
> It _does_ assume that bytevector lengths don't change:
[...]
> As can be seen in the above output, it first determines
> the length of the bytevector and then compares it again the index
> (for the index check) and then actually reads th byte
> so it assumes that the length doesn't change in-between -- it's not an
> atomic operation!
Oh right.
> Even if it didn't, being able to assume bytevector lengths don't change
> is important for optimising code like (begin (bytevector-ref bv 9000)
> (bytevector-ref 8999) ...)),
> to optimise out many range checks, though I don't know if Guile currently
> does that.
Indeed.
Ludo’.
- Re: mmap for guile, Ludovic Courtès, 2022/07/04
- Re: mmap for guile, Matt Wette, 2022/07/04
- Re: mmap for guile, Greg Troxel, 2022/07/04
- Re: mmap for guile, Maxime Devos, 2022/07/19
- Re: mmap for guile,
Ludovic Courtès <=
- Re: mmap for guile, Maxime Devos, 2022/07/19
- Re: mmap for guile, Maxime Devos, 2022/07/19