Coalesce simple parts of a complex 'or' expression #79

Open
opened 2020-08-06 16:54:34 +00:00 by gburd · 0 comments
gburd commented 2020-08-06 16:54:34 +00:00 (Migrated from github.com)

We implement simple or via alternation:

[?page :page/title ?foo]
[?page :page/meta ?foo]

becomes

(:or
  [:= :datoms123.a :page/title]
  [:= :datoms123.a :page/meta])

We don't currently recognize the simple subparts of a non-simple or, so we generate distinct UNION arms instead.

Implementing this optimization will be a nice performance win, and shouldn't be too difficult.

We implement simple `or` via alternation: ``` [?page :page/title ?foo] [?page :page/meta ?foo] ``` becomes ``` (:or [:= :datoms123.a :page/title] [:= :datoms123.a :page/meta]) ``` We don't currently recognize the simple subparts of a non-simple `or`, so we generate distinct `UNION` arms instead. Implementing this optimization will be a nice performance win, and shouldn't be too difficult.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/mentat#79
No description provided.