~jojo/Carth

ref: 5f4549698c6783d9dbed5f2bf6b12d537a529314 Carth/test/bench/big-nested-struct-on-heap.carth -rw-r--r-- 410 bytes
5f454969JoJo Test that examples and benchmarks compile 1 year, 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(import std)

(define (main Unit)
  (for (range-from 0) big-allocation))

(define (big-allocation n)
  (let ((a (A n n n n))
        (b (B a a a a))
        (c (C b b b b))
        (d (D c c c c))
        (e (E d d d d)))
    (seq (box (F e e e e)) (display (show-int n)))))

(data A (A Int Int Int Int))
(data B (B A A A A))
(data C (C B B B B))
(data D (D C C C C))
(data E (E D D D D))
(data F (F E E E E))