Skip to content

Commit

Permalink
perf: optimize IF THEN ELSE for cases where condition expression reso…
Browse files Browse the repository at this point in the history
…lves to a constant (#103)

Fixes #102
  • Loading branch information
chrispcampbell authored Aug 17, 2021
1 parent 2ed7e42 commit f9ef675
Show file tree
Hide file tree
Showing 11 changed files with 915 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
- name: Run Tests
run: |
npm run prettier:check
npm test
npm run test
230 changes: 230 additions & 0 deletions models/prune/prune.dat
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ B1 Totals
8 135.714
9 150
10 170
Constant Partial 1
0 1
Constant Partial 2
0 2
D Totals
0 11000
1 11200
Expand Down Expand Up @@ -60,6 +64,10 @@ E2 Values
10 8400
FINAL TIME
0 10
Initial Partial[C1]
0 1
Initial Partial[C2]
0 2
INITIAL TIME
0 0
Input 1
Expand Down Expand Up @@ -116,6 +124,18 @@ Look2 Value at t1
8 1
9 1
10 1
Partial[C2]
0 2
1 2
2 2
3 2
4 2
5 2
6 2
7 2
8 2
9 2
10 2
SAVEPER
0 1
1 1
Expand All @@ -140,6 +160,216 @@ Simple Totals
8 4242.86
9 4400
10 5500
Test 1 F
0 2
Test 1 Result
0 1
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
Test 1 T
0 1
Test 10 Cond
0 1
Test 10 F
0 2
Test 10 Result
0 1
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
Test 10 T
0 1
Test 11 Cond
0 0
Test 11 F
0 2
Test 11 Result
0 2
1 2
2 2
3 2
4 2
5 2
6 2
7 2
8 2
9 2
10 2
Test 11 T
0 1
Test 12 Cond
0 1
Test 12 F
0 2
Test 12 Result
0 1
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
Test 12 T
0 1
Test 2 F
0 2
Test 2 Result
0 2
1 2
2 2
3 2
4 2
5 2
6 2
7 2
8 2
9 2
10 2
Test 2 T
0 1
Test 3 F
0 2
Test 3 Result
0 1
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
Test 3 T
0 1
Test 4 Cond
0 0
Test 4 F
0 2
Test 4 Result
0 2
1 2
2 2
3 2
4 2
5 2
6 2
7 2
8 2
9 2
10 2
Test 4 T
0 1
Test 5 Cond
0 1
Test 5 F
0 2
Test 5 Result
0 1
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
Test 5 T
0 1
Test 6 Cond
0 0
Test 6 F
0 2
Test 6 Result
0 2
1 2
2 2
3 2
4 2
5 2
6 2
7 2
8 2
9 2
10 2
Test 6 T
0 1
Test 7 Cond
0 1
Test 7 F
0 2
Test 7 Result
0 1
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
Test 7 T
0 1
Test 8 Cond
0 0
Test 8 F
0 2
Test 8 Result
0 2
1 2
2 2
3 2
4 2
5 2
6 2
7 2
8 2
9 2
10 2
Test 8 T
0 1
Test 9 Cond
0 1
Test 9 F
0 2
Test 9 Result
0 1
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
Test 9 T
0 1
TIME STEP
0 1
With Look1 at t1
Expand Down
Loading

0 comments on commit f9ef675

Please sign in to comment.