Skip to content

Commit 0c41df3

Browse files
committed
feat: Add Fibonacci recursion and GC stress benchmark scripts.
1 parent 7d2ae9f commit 0c41df3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

benchmarks/fibonacci.prox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ func fib(n) {
66
return fib(n - 1) + fib(n - 2);
77
}
88

9-
print("Starting Fib(30)...");
9+
print("Starting Fib(20)...");
1010
let start = clock();
11-
let res = fib(30);
11+
let res = fib(20);
1212
let end = clock();
1313
print("Result: " + res);
1414
print("Time: " + (end - start));

benchmarks/gc_stress.prox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
fun stress() {
66
var list = "start";
7-
for (var i = 0; i < 10000; i = i + 1) {
7+
for (var i = 0; i < 500; i = i + 1) {
88
// String concatenation creates new objects
99
var temp = "iteration " + i;
1010
// Abandon 'temp' immediately
1111

1212
// Create nested structures if supported (Map/List)
1313
// Assuming native lists or similar behave as objects
1414

15-
if (i % 1000 == 0) {
15+
if (i % 100 == 0) {
1616
print "Iteration: " + i;
1717
}
1818
}

0 commit comments

Comments
 (0)