Replies: 1 comment
-
Thanks! It is an excellent summary 😄 For the Units, we have this issue #257, so we should also double-check UnitJuMP.jl which is built on top of Unitful.jl and is specific to check units in JuMP. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
Recently I attended a Julia training workshop.
Below are my main takeaways, and if you are further interested, the full material can be found here.
Maybe we find some inspirations to improve Tulipa.
Basics
@macroexpand
, e.g.,@macroexpand @assert false "Oh, noes!"
return
in functions is only optional.Performance
T
) to be generic and type stable.eachindex
and relatives (think ofkeys
,values
,pairs
,enumerate
,zip
) are good ways to iterate collections.result = Vector{Float64}(undef, n)
.@profview
, and analyze further using@code_warntype
. Usingprofview
, the red areas in the flame graph show type unstable code (marked with run-time dispatch).Val(N)
instead of justN
.Misc
@kwdef
allows to give initial values for structs. So instead of using functions to initialize, this is more concise.Beta Was this translation helpful? Give feedback.
All reactions