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

TypeTree speedup shiftindicies #1744

Merged
merged 5 commits into from
Feb 20, 2024
Merged

TypeTree speedup shiftindicies #1744

merged 5 commits into from
Feb 20, 2024

Conversation

wsmoses
Copy link
Member

@wsmoses wsmoses commented Feb 19, 2024

Fixes #1743

@wsmoses
Copy link
Member Author

wsmoses commented Feb 19, 2024

note I left the slow version right now to do correctness tests, which already found a bug locally (which have fixed). Going to run it on the whole test suite, then disable the check once it comes back valid.

@wsmoses
Copy link
Member Author

wsmoses commented Feb 19, 2024

Also note this fix hopefully changes the asymptotic behavior of ShiftIndices from $O(n^2)$ to $O(n)$ [which it really should've been the whole time]

@vchuravy
Copy link
Member

Seems like a speedup from 220s to 180s, but TypeTree::insert and TypeTree:checkedOrIn are still very hot

Before:

image

After:

image

image

Detailed analysis:

  • checkedOrIn ~28s (42% of compilation time)
    • 17s from update Analysis
    • 10.5s from EnzymeMergeTypeTree
  • CanonicalizeInPlace: 11s

@ZuseZ4
Copy link
Member

ZuseZ4 commented Feb 20, 2024

@vchuravy If already at it, could you please also profile one from #1641 if you have a few minutes? My server never had the permissions for vtune. My new Laptop is reasonable otherwise, so I can also set it up myself

@wsmoses
Copy link
Member Author

wsmoses commented Feb 20, 2024 via email

@wsmoses wsmoses merged commit 1ea2e0b into main Feb 20, 2024
46 of 54 checks passed
@wsmoses wsmoses deleted the fastshiftind branch February 20, 2024 14:31
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.

Performance of type-analysis
3 participants