Skip to content

Optimize issymbollike - #156

Merged
YingboMa merged 1 commit into
masterfrom
myb/opt
Jul 8, 2021
Merged

YingboMa merged 1 commit into
masterfrom
myb/opt

Conversation

@YingboMa

@YingboMa YingboMa commented Jul 8, 2021

Copy link
Copy Markdown
Member
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
Copy Markdown
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.

2 participants