Re: 01/02: packages: Adjust 'generate-package-cache' for Guile 3.0.9.

2023-01-31 Thread Simon Tournier
Hi Ludo,

On Mon, 30 Jan 2023 at 22:52, Ludovic Courtès  wrote:

>> What are the performances about this change?  Does it improve the
>> generation of the cache?  Faster or slower?
>>
>> Or the resulting cache, is it larger or smaller?
>
> The resulting cache is unchanged and build time should be similar, but
> memory usage is slightly reduced:
>
>   https://lists.gnu.org/archive/html/guile-devel/2023-01/msg00013.html

Thanks for the pointer.  Cool!

Cheers,
simon



Re: 01/02: packages: Adjust 'generate-package-cache' for Guile 3.0.9.

2023-01-30 Thread Ludovic Courtès
Hi!

Simon Tournier  skribis:

> Commit ba1b61a72d56600e7c6f9c490129e95ab9ba0c9e reads:
>
> packages: Adjust 'generate-package-cache' for Guile 3.0.9.
>
> * gnu/packages.scm (generate-package-cache): Adjust for Guile 3.0.9.

[...]

> What are the performances about this change?  Does it improve the
> generation of the cache?  Faster or slower?
>
> Or the resulting cache, is it larger or smaller?

The resulting cache is unchanged and build time should be similar, but
memory usage is slightly reduced:

  https://lists.gnu.org/archive/html/guile-devel/2023-01/msg00013.html

Ludo’.



01/02: packages: Adjust 'generate-package-cache' for Guile 3.0.9.

2023-01-26 Thread Simon Tournier
Hi,

Commit ba1b61a72d56600e7c6f9c490129e95ab9ba0c9e reads:

--8<---cut here---start->8---
packages: Adjust 'generate-package-cache' for Guile 3.0.9.

* gnu/packages.scm (generate-package-cache): Adjust for Guile 3.0.9.

[...]

@@ -442,10 +443,15 @@ (define exp
 (lambda (port)
   ;; Store the cache as a '.go' file.  This makes loading fast and reduces
   ;; heap usage since some of the static data is directly mmapped.
-  (put-bytevector port
-  (compile `'(,@exp)
-   #:to 'bytecode
-   #:opts '(#:to-file? #t)
+  (match (compile `'(,@exp)
+  #:to 'bytecode
+  #:opts '(#:to-file? #t))
+((? bytevector? bv)
+ (put-bytevector port bv))
+(proc
+ ;; In Guile 3.0.9, the linker can return a procedure instead of a
+ ;; bytevector.  Adjust to that.
+ (proc port)
   cache-file)
--8<---cut here---end--->8---

Cool!

What are the performances about this change?  Does it improve the
generation of the cache?  Faster or slower?

Or the resulting cache, is it larger or smaller?


Cheers,
simon