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

perf: O(1) optag superset checks #595

Closed
wants to merge 2 commits into from
Closed

perf: O(1) optag superset checks #595

wants to merge 2 commits into from

Conversation

aborgna-q
Copy link
Collaborator

Pre-computes a superset matrix, so the checks can be done in a single operation.

Adds a benchmark to see the change.
Before the changes:

optag/tag_superset/(Const, Any)
                        time:   [1.2409 ns 1.2595 ns 1.2802 ns]

After the changes:

optag/tag_superset/(Const, Any)
                        time:   [129.44 ps 130.92 ps 132.46 ps]
                        change: [-89.435% -89.267% -89.098%] (p = 0.00 < 0.05)

@aborgna-q aborgna-q requested a review from acl-cqc October 9, 2023 11:13
@acl-cqc
Copy link
Contributor

acl-cqc commented Oct 9, 2023

Love it, but there is NO WAY we should micro-optimize this until we know that the optag-superset check (in replace_op or elsewhere) is actually a bottleneck in any real-world usecase.

Sorry!

@aborgna-q
Copy link
Collaborator Author

:(

@aborgna-q aborgna-q closed this Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants