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

Some problems objective function allocate #243

Open
tmigot opened this issue Jan 10, 2023 · 1 comment
Open

Some problems objective function allocate #243

tmigot opened this issue Jan 10, 2023 · 1 comment

Comments

@tmigot
Copy link
Member

tmigot commented Jan 10, 2023

Here is the list:

- [ ] brybnd
- [ ] clplatea
- [ ] clplateb
- [ ] clplatec
- [ ] curly
- [ ] curly10
- [ ] curly20
- [ ] curly30
- [ ] elec
- [ ] fminsrf2
- [ ] hovercraft1d
- [ ] hs111
- [ ] hs117
- [ ] hs119
- [ ] hs86
- [ ] ncb20
- [ ] ncb20b
- [ ] palmer1c
- [ ] palmer1d
- [ ] palmer2c
- [ ] palmer3c
- [ ] palmer4c
- [ ] palmer5c
- [ ] palmer5d
- [ ] palmer6c
- [ ] palmer7c
- [ ] palmer8c
- [ ] penalty2
- [ ] polygon2
- [ ] sbrybnd
- [ ] spmsrtls
- [ ] tetra
- [ ] tetra_duct12
- [ ] tetra_duct15
- [ ] tetra_duct20
- [ ] tetra_foam5
- [ ] tetra_gear
- [ ] tetra_hook
- [ ] threepk
- [ ] triangle
- [ ] triangle_deer
- [ ] triangle_pacman
- [ ] triangle_turtle

Originally posted by @tmigot in #242 (comment)

@tmigot
Copy link
Member Author

tmigot commented Apr 12, 2023

Some here are due to imbricated sums, for instance:

julia> function f(x) return sum(sum(i * j * x[i] for i=1:j) * x[j] for j=1:10) end
f (generic function with 3 methods)

julia> @code_warntype f(x)
MethodInstance for f(::Vector{Float64})
  from f(x; n) in Main at REPL[65]:1
Arguments
  #self#::Core.Const(f)
  x::Vector{Float64}
Locals
  #144::var"#144#146"{Vector{Float64}}
Body::Any
1 ─ %1 = Main.:(var"#144#146")::Core.Const(var"#144#146")
│   %2 = Core.typeof(x)::Core.Const(Vector{Float64})
│   %3 = Core.apply_type(%1, %2)::Core.Const(var"#144#146"{Vector{Float64}})
│        (#144 = %new(%3, x))
│   %5 = #144::var"#144#146"{Vector{Float64}}
│   %6 = (1:10)::Core.Const(1:10)
│   %7 = Base.Generator(%5, %6)::Core.PartialStruct(Base.Generator{UnitRange{Int64}, var"#144#146"{Vector{Float64}}}, Any[var"#144#146"{Vector{Float64}}, Core.Const(1:10)])
│   %8 = Main.sum(%7)::Any
└──      return %8

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

No branches or pull requests

1 participant