Skip to content

Conversation

@YingboMa
Copy link
Member

@YingboMa YingboMa commented Jul 8, 2021

julia> @variables x;

julia> @btime issymbollike(Ref($x)[])
  0.026 ns (0 allocations: 0 bytes)
true

julia> @btime issymbollike(Ref(1)[])
  0.026 ns (0 allocations: 0 bytes)
false

julia> @btime issymbollike(Ref(:x)[])
  0.026 ns (0 allocations: 0 bytes)
true

@ChrisRackauckas
Copy link
Member

I'm surprised Base.@pure didn't get to this.

@YingboMa YingboMa merged commit 5a85e7d into master Jul 8, 2021
@YingboMa YingboMa deleted the myb/opt branch July 8, 2021 14:09
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