Skip to content

Commit d77a453

Browse files
committed
feat: add macro benchmark for JSON parsing and micro benchmark for array operations.
1 parent 68c560d commit d77a453

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

benchmarks/macro/json_bench.prox

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
class JsonParser {
55
init(inp) {
66
print("Inside init");
7-
this.input = inp;
7+
this.src = inp;
88
this.pos = 0;
99
this.len = len(inp);
1010
}
1111

1212
peek() {
1313
if (this.pos >= this.len) return "";
14-
return substr(this.input, this.pos, 1);
14+
return substr(this.src, this.pos, 1);
1515
}
1616

1717
consume() {
1818
if (this.pos >= this.len) return "";
19-
let c = substr(this.input, this.pos, 1);
19+
let c = substr(this.src, this.pos, 1);
2020
this.pos = this.pos + 1;
2121
return c;
2222
}

benchmarks/micro/array_ops.prox

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11

22
func main() {
3-
print(push);
43
let start = clock();
54
let arr = [];
65
for (let i = 0; i < 50000; i = i + 1) {

0 commit comments

Comments
 (0)