File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff 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 )...");
1010let start = clock();
11- let res = fib(30 );
11+ let res = fib(20 );
1212let end = clock();
1313print("Result: " + res);
1414print("Time: " + (end - start));
Original file line number Diff line number Diff line change 44
55fun 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 }
You can’t perform that action at this time.
0 commit comments