Perf: Implement a new algorithm for pattern matching compilation to reduce code size
Compare changes
@@ -13,6 +13,7 @@ module O = Ast_expanded
@@ -13,6 +13,7 @@ module O = Ast_expanded
@@ -160,15 +161,15 @@ let rec to_simple_pattern
@@ -160,15 +161,15 @@ let rec to_simple_pattern
@@ -191,6 +192,37 @@ let rec to_simple_pattern
@@ -191,6 +192,37 @@ let rec to_simple_pattern
@@ -218,7 +250,7 @@ type decision_tree =
@@ -218,7 +250,7 @@ type decision_tree =
@@ -311,7 +343,9 @@ let swap_column_in_matrix : int -> matrix -> matrix =
@@ -311,7 +343,9 @@ let swap_column_in_matrix : int -> matrix -> matrix =
let rec generate_match_record : Label.t list -> I.type_expression -> decision_tree -> decision_tree =
@@ -320,16 +354,20 @@ let rec generate_match_record : Label.t list -> I.type_expression -> decision_tr
@@ -320,16 +354,20 @@ let rec generate_match_record : Label.t list -> I.type_expression -> decision_tr
@@ -350,8 +388,10 @@ let rec compile : Label.t list -> matrix -> decision_tree =
@@ -350,8 +388,10 @@ let rec compile : Label.t list -> matrix -> decision_tree =
@@ -363,7 +403,17 @@ let rec compile : Label.t list -> matrix -> decision_tree =
@@ -363,7 +403,17 @@ let rec compile : Label.t list -> matrix -> decision_tree =
@@ -382,8 +432,13 @@ let test
@@ -382,8 +432,13 @@ let test
@@ -394,4 +449,8 @@ if 1st occurance is a record/tuple generate SwitchRecord
@@ -394,4 +449,8 @@ if 1st occurance is a record/tuple generate SwitchRecord