Skip to content

Commit 329b274

Browse files
committed
Push a few ccalling methods onto compiled_methods
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
1 parent 722f82f commit 329b274

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/packagedef.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ function set_compiled_methods()
106106
end
107107
end
108108

109+
# This is about performance, not safety (issue #462)
110+
push!(compiled_methods, which(nameof, (Module,)))
111+
push!(compiled_methods, which(Base.binding_module, (Module, Symbol)))
112+
push!(compiled_methods, which(Base.unsafe_pointer_to_objref, (Ptr,)))
113+
push!(compiled_methods, which(Vector{Int}, (UndefInitializer, Int)))
114+
push!(compiled_methods, which(fill!, (Vector{Int8}, Int)))
115+
109116
###########
110117
# Modules #
111118
###########

0 commit comments

Comments
 (0)