Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate constitution golden tests #6785

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2132
2144
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ExBudget {exBudgetCPU = ExCPU 601476171, exBudgetMemory = ExMemory 2971818}
ExBudget {exBudgetCPU = ExCPU 604948171, exBudgetMemory = ExMemory 2993518}
Original file line number Diff line number Diff line change
Expand Up @@ -491,26 +491,30 @@ program
Nothing : Maybe a
in
letrec
!go : list (pair data data) -> List (Tuple2 data data)
= \(l : list (pair data data)) ->
chooseList
{pair data data}
{unit -> List (Tuple2 data data)}
l
(\(ds : unit) -> Nil {Tuple2 data data})
(\(ds : unit) ->
Cons
{Tuple2 data data}
(let
!p : pair data data = headList {pair data data} l
in
Tuple2
{data}
{data}
(fstPair {data} {data} p)
(sndPair {data} {data} p))
(go (tailList {pair data data} l)))
()
~caseData_go : list (pair data data) -> List (Tuple2 data data)
= (let
a = pair data data
in
/\r ->
\(z : r) (f : a -> list a -> r) (xs : list a) ->
chooseList
{a}
{all dead. r}
xs
(/\dead -> z)
(/\dead -> f (headList {a} xs) (tailList {a} xs))
{r})
Comment on lines +499 to +506
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the old way of doing pattern matching, so performance changes are arbitrary. It looks like something has become lazier and something has become stricter, so it's just all noise. Instead of investigating this we should move to pattern matching builtins and then look for optimization opportunities in generated code.

{List (Tuple2 data data)}
(Nil {Tuple2 data data})
(\(x : pair data data) (xs : list (pair data data)) ->
Cons
{Tuple2 data data}
(Tuple2
{data}
{data}
(fstPair {data} {data} x)
(sndPair {data} {data} x))
(caseData_go xs))
in
let
!fun : List (Tuple2 data data) -> Bool
Expand Down Expand Up @@ -5329,11 +5333,13 @@ program
(/\dead ->
Just
{List (Tuple2 data data)}
(go
(unMapData
(headList
{data}
(tailList {data} (sndPair {integer} {list data} ds))))))
(let
!d : data
= headList
{data}
(tailList {data} (sndPair {integer} {list data} ds))
in
caseData_go (unMapData d)))
(/\dead ->
Bool_match
(ifThenElse {Bool} (equalsInteger 2 x) True False)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ExBudget {exBudgetCPU = ExCPU 91525157, exBudgetMemory = ExMemory 413605}
ExBudget {exBudgetCPU = ExCPU 91749157, exBudgetMemory = ExMemory 415005}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2127
2139
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ExBudget {exBudgetCPU = ExCPU 960426341, exBudgetMemory = ExMemory 4867088}
ExBudget {exBudgetCPU = ExCPU 963898341, exBudgetMemory = ExMemory 4888788}
Original file line number Diff line number Diff line change
Expand Up @@ -423,26 +423,30 @@ program
Nothing : Maybe a
in
letrec
!go : list (pair data data) -> List (Tuple2 data data)
= \(l : list (pair data data)) ->
chooseList
{pair data data}
{unit -> List (Tuple2 data data)}
l
(\(ds : unit) -> Nil {Tuple2 data data})
(\(ds : unit) ->
Cons
{Tuple2 data data}
(let
!p : pair data data = headList {pair data data} l
in
Tuple2
{data}
{data}
(fstPair {data} {data} p)
(sndPair {data} {data} p))
(go (tailList {pair data data} l)))
()
~caseData_go : list (pair data data) -> List (Tuple2 data data)
= (let
a = pair data data
in
/\r ->
\(z : r) (f : a -> list a -> r) (xs : list a) ->
chooseList
{a}
{all dead. r}
xs
(/\dead -> z)
(/\dead -> f (headList {a} xs) (tailList {a} xs))
{r})
{List (Tuple2 data data)}
(Nil {Tuple2 data data})
(\(x : pair data data) (xs : list (pair data data)) ->
Cons
{Tuple2 data data}
(Tuple2
{data}
{data}
(fstPair {data} {data} x)
(sndPair {data} {data} x))
(caseData_go xs))
in
let
!cfg : List (Tuple2 integer ParamValue)
Expand Down Expand Up @@ -5263,11 +5267,13 @@ program
(/\dead ->
Just
{List (Tuple2 data data)}
(go
(unMapData
(headList
{data}
(tailList {data} (sndPair {integer} {list data} ds))))))
(let
!d : data
= headList
{data}
(tailList {data} (sndPair {integer} {list data} ds))
in
caseData_go (unMapData d)))
(/\dead ->
Bool_match
(ifThenElse {Bool} (equalsInteger 2 x) True False)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ExBudget {exBudgetCPU = ExCPU 89279267, exBudgetMemory = ExMemory 402103}
ExBudget {exBudgetCPU = ExCPU 89503267, exBudgetMemory = ExMemory 403503}
Loading
Loading