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

[WIP] Miscellaneous swift-evolve speed improvements #28

Merged
merged 4 commits into from Jan 10, 2019

Conversation

Projects
None yet
2 participants
@brentdax
Copy link
Contributor

brentdax commented Jan 5, 2019

This PR includes several tiny changes which speed up particularly hot paths in swift-evolve. Collectively, they reduce Integers.swift runtime from 49 sec to 28 14 sec on an iMac Pro. (Both the before and after measurements include the changes in #27, although this PR doesn't actually depend on that one.)

@brentdax brentdax force-pushed the brentdax:must-go-faster branch 2 times, most recently from 9ca7e69 to dee93be Jan 9, 2019

brentdax added some commits Jan 5, 2019

Hide detailed output behind a --verbose flag
In addition to simply reducing console I/O, this change means we can omit detailed line-and-column information from sourceLocations, which is very expensive to calculate (20% of runtime).
Use [Int] instead of IndexPath
The latter copies its internal array every time you call removeLast(), which we do frequently.
Store list of excluded declarations as a Set
This turned out to be a pretty hot code path.
Precompute DeclContext.name
It gets called a *lot*. Wall time drops from 28 sec to 14 sec.

@brentdax brentdax force-pushed the brentdax:must-go-faster branch 2 times, most recently from e4ebbcb to f29fc9d Jan 10, 2019

@brentdax brentdax requested a review from harlanhaskins Jan 10, 2019

@brentdax brentdax merged commit 752aa2f into apple:master Jan 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment