;; https://issues.guix.gnu.org/63852 (use-modules (system base compile) (language tree-il) (srfi srfi-1) (srfi srfi-26) (ice-9 match) (ice-9 time) (statprof)) (define lst (unfold (cut > <> 22000) (lambda (i) ;; Mimic 'generate-package-cache'. (define name (string-append "xyzxyz-" (number->string i 8))) (vector i name (string-append "1.0." (number->string (modulo i 300))) (list 'gnu 'packages (string->symbol (string-append "xyz" (number->string i)))) (string->symbol name) '("out") #t #f (string-append "gnu/packages/xyz" (number->string (modulo i 300))) (modulo i 1000) 1)) 1+ 0)) (pk 'go! (gc-stats)) (let ((exp (match (or (getenv "VARIANT") "0") ("0" `',lst) ("1" `(list ,@lst)) ("2" (make-const #f lst)) ;avoid psyntax overhead ("3" (make-primcall #f 'list (map (lambda (vector) (make-const #f vector)) lst)))))) (compile exp #:to 'bytecode #:from (if (pair? exp) 'scheme 'tree-il) #:optimization-level 0 #:opts '(#:to-file? #t))) (pk (gc-stats))