We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
getfield would be more efficient than eval in getting the value of a variable/function name here:
getfield
eval
DSGE.jl/src/forecast/smooth.jl
Line 78 in e55b4dc
Toy example:
julia> using BenchmarkTools julia> foo = 42 42 julia> @btime eval(Symbol("foo")) 44.230 ns (0 allocations: 0 bytes) 42 julia> @btime getfield(Main, Symbol("foo")) 1.180 ns (0 allocations: 0 bytes) 42
The text was updated successfully, but these errors were encountered:
Thanks for this! This change will be added to the next release of the package.
Sorry, something went wrong.
No branches or pull requests
getfield
would be more efficient thaneval
in getting the value of a variable/function name here:DSGE.jl/src/forecast/smooth.jl
Line 78 in e55b4dc
Toy example:
The text was updated successfully, but these errors were encountered: