Skip to content

Commit

Permalink
Push a few ccalling methods onto compiled_methods
Browse files Browse the repository at this point in the history
These methods trigger compilation of `build_compiled_call!` during
Revise.revise(). Since they are essentially `ccall`-wrappers already,
there's not a lot of value in interpreting them.

Saves another ~100ms off the latency.

Closes #462
  • Loading branch information
timholy committed Dec 20, 2020
1 parent 722f82f commit 329b274
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/packagedef.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ function set_compiled_methods()
end
end

# This is about performance, not safety (issue #462)
push!(compiled_methods, which(nameof, (Module,)))
push!(compiled_methods, which(Base.binding_module, (Module, Symbol)))
push!(compiled_methods, which(Base.unsafe_pointer_to_objref, (Ptr,)))
push!(compiled_methods, which(Vector{Int}, (UndefInitializer, Int)))
push!(compiled_methods, which(fill!, (Vector{Int8}, Int)))

###########
# Modules #
###########
Expand Down

0 comments on commit 329b274

Please sign in to comment.