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

eliminate stage0 inference #15925

Merged
merged 1 commit into from
Apr 19, 2016
Merged

eliminate stage0 inference #15925

merged 1 commit into from
Apr 19, 2016

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Apr 18, 2016

all it did was ensure that everything in specializations was inferred
and require a lot of complex infrastructure to make it acceptable to
replace a module during compilation

but instead we can just infer everything in specializations directly

(cherry-picked from #15918)

@vchuravy vchuravy mentioned this pull request Apr 19, 2016
all it did was ensure that everything in specializations was inferred
and require a lot of complex infrastructure to make it acceptable to
replace a module during compilation

but instead we can just infer everything in specializations directly
@vtjnash vtjnash merged commit 57a0c72 into master Apr 19, 2016
@vtjnash vtjnash deleted the jn/no-stage0 branch April 19, 2016 18:21
@JeffBezanson
Copy link
Member

I see possible regressions here.

On commit 0810634

     * linalg/triangular     in 444.61 seconds, maxrss  861.92 MB
     * numbers               in  96.93 seconds, maxrss  338.26 MB

and on master 9d4d36c

     * linalg/triangular     in 471.98 seconds, maxrss  908.10 MB
     * numbers               in 130.09 seconds, maxrss  351.44 MB

@vtjnash
Copy link
Member Author

vtjnash commented Apr 20, 2016

if i had to guess, it's that the leaftype kind ::DataType gets added to a cache somewhere, and that prevents the runtime from doing more (better) specialization on it later

but my bisect indicates it is caused by #15934, not this one

@JeffBezanson
Copy link
Member

That's interesting. I don't see how #15934 can add time to anything except building a system image, unless the mere presence of extra functions slows things down somehow. But compared to how much stuff we compile during the tests the extra code doesn't seem too significant.

@vtjnash
Copy link
Member Author

vtjnash commented Apr 20, 2016

my thought was that we compiled something for f(::DataType) instead of for each f(::Type{T}) and that impacted the cache. alternatively, perhaps simply the presence of a few extra cache entries somewhere critical made lookup slower for some critical item? there's still a lot of optimization opportunities for adding short-circuit paths out of the typemap lookups

@tkelman
Copy link
Contributor

tkelman commented Apr 20, 2016

contrib/build_sysimg.jl needs fixing

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.

3 participants