Adjust initial allocations to improve memory efficiency.
Also convert existing .rls (Rosella Source) files to module syntax.
This commit is contained in:
parent
8318db755f
commit
b3fd7bf6fc
|
|
@ -47,7 +47,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gc_init(6*1024*1024, 10*1024*1024, 16*1024*1024);
|
gc_init(1024*1024, 1024*1024, 4*1024*1024);
|
||||||
builtin_init();
|
builtin_init();
|
||||||
interpreter_init();
|
interpreter_init();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
(letrec ([fact-iter (lambda (n product)
|
(define (fact-iter n product)
|
||||||
(if (fix> n 1)
|
(if (fix> n 1)
|
||||||
(fact-iter (fix- n 1) (fix* n product))
|
(fact-iter (fix- n 1) (fix* n product))
|
||||||
product))])
|
product))
|
||||||
(fact-iter (string->number (car argv)) 1))
|
|
||||||
|
(fact-iter (string->number (car *argv*)) 1)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
(letrec ([fact (lambda (n)
|
(define (fact n)
|
||||||
(if (fix> n 1)
|
(if (fix> n 1)
|
||||||
(fix* n (fact (fix- n 1)))
|
(fix* n (fact (fix- n 1)))
|
||||||
1))])
|
1))
|
||||||
(fact (string->number (car argv))))
|
|
||||||
|
(fact (string->number (car *argv*)))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue