Skip to content

Conversation

@JeffBezanson
Copy link
Member

This allows constant-folding NamedTuple constructors, in turn allowing constant prop through keyword arguments.

This might make the compiler very slightly slower, but fortunately I don't see a significant effect, maybe half a second building Base. The extra type info definitely seems worth it.

@JeffBezanson JeffBezanson added the compiler:inference Type inference label May 21, 2020
@YingboMa
Copy link
Contributor

I wonder if we can have the ability to disable constant folding for a few arguments. This will help the compile time for functions with default arguments.

This allows constant-folding NamedTuple constructors, in turn
allowing constant prop through keyword arguments.
@JeffBezanson JeffBezanson merged commit 7124472 into master May 26, 2020
@JeffBezanson JeffBezanson deleted the jb/kw_const_prop branch May 26, 2020 17:18
@ChrisRackauckas
Copy link
Member

Can this make it into v1.5 or is that unsafe?

@JeffBezanson JeffBezanson added triage This should be discussed on a triage call backport 1.5 labels Jun 4, 2020
ChrisRackauckas added a commit to ChrisRackauckas/julia that referenced this pull request Jun 15, 2020
I think JuliaLang#35976 is a pretty big deal since it makes all of SciML suddenly infer a lot better, and probably another big library that's splatting keyword arguments. So I added a note to the compiler/runtime improvements.
JeffBezanson pushed a commit that referenced this pull request Jun 15, 2020
I think #35976 is a pretty big deal since it makes all of SciML suddenly infer a lot better, and probably another big library that's splatting keyword arguments. So I added a note to the compiler/runtime improvements.
JeffBezanson added a commit that referenced this pull request Jun 18, 2020
This allows constant-folding NamedTuple constructors, in turn
allowing constant prop through keyword arguments.

(cherry picked from commit 7124472)
@StefanKarpinski StefanKarpinski removed the triage This should be discussed on a triage call label Jul 16, 2020
simeonschaub pushed a commit to simeonschaub/julia that referenced this pull request Aug 11, 2020
This allows constant-folding NamedTuple constructors, in turn
allowing constant prop through keyword arguments.
simeonschaub pushed a commit to simeonschaub/julia that referenced this pull request Aug 11, 2020
I think JuliaLang#35976 is a pretty big deal since it makes all of SciML suddenly infer a lot better, and probably another big library that's splatting keyword arguments. So I added a note to the compiler/runtime improvements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:inference Type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants