shithub: sl

ref: 7c3809229021fa3206971e359ed6c7c0f538897a
dir: /test/torture.sl/

View raw version
(def ones (map (λ (x) 1) (iota 1000000)))

(write (apply + ones))
(newline)

(def (big n)
  (if (<= n 0)
      0
      `(+ 1 1 1 1 1 1 1 1 1 1 ,(big (- n 1)))))

; https://todo.sr.ht/~ft/sl/2
;(def nst (big 100000))
;(write (eval nst))
;(newline)

(def longg (cons '+ ones))
(write (eval longg))
(newline)

(princ "----- before GC") (newline)
(vm-stats)
(gc)
(princ "----- after GC") (newline)
(vm-stats)
(makunbound 'ones)
(makunbound 'big)
(makunbound 'longg)
(gc)
(princ "----- after makunbound+GC") (newline)
(vm-stats)