From 329b274bf330d4f1e819272c60b8663519ef82f5 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Sun, 20 Dec 2020 07:36:45 -0600 Subject: [PATCH] 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 --- src/packagedef.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/packagedef.jl b/src/packagedef.jl index 52b23146b2a49e..38b06685b9a7bf 100644 --- a/src/packagedef.jl +++ b/src/packagedef.jl @@ -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 # ###########