File: stats

package info (click to toggle)
scheme9 2025.08.12-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,080 kB
  • sloc: lisp: 16,752; ansic: 11,869; sh: 806; makefile: 237; sed: 6
file content (21 lines) | stat: -rw-r--r-- 747 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
S9fES  (stats form)  ==>  list

Evaluate the given FORM and return a list containing its
normal form plus the resources used to compute that normal
form:

        - total nodes allocated
        - conses allocated
        - vector cells allocated
        - garbage collections performed

Each resource count will be returned as a group of integers
representing ones, thousands, millions, etc. Note that FORM
must be quoted or it will be evaluated before passing it to
STATS.

(stats '(reverse '(1 2 3)))  ==>  ((3 2 1)
                                   (0 0 0 0 3)   ; nodes
                                   (0 0 0 0 3)   ; conses
                                   (0 0 0 0 0)   ; vcells
                                   (0 0 0 0 0))  ; GCs