This file contains information about major updates since 1.0.
Version 3 is a greatly slimmed repository, focusing just on those tools that are relevant for modern Julia development. If you are still using old tools, you should stick with SnoopCompile 2.x.
Major changes:
@snoopi_deep
has been renamed@snoop_inference
@snoopr
has been renamed@snoop_invalidations
.@snoopl
has been renamed@snoop_llvm
.- The old
@snoopc
has been deleted. Its functionality was largely subsumed intojulia --trace-compile
. @snoopi
has been deleted, as@snoopi_deep
provided more comprehensive information and is available on all modern Julia versions.- SnoopCompileBot was deleted in favor of CompileBot
- SnoopPrecompile was deleted because it is now PrecompileTools
- JET, Cthulhu, PrettyTables, and PyPlot are all integrated via package extensions. As a consequence, users now have to load them manually.
This version implements major changes in how parcel
works on the output of @snoopi
:
- keyword-supplying methods are now looked up as
Core.kwftype(f)
rather than by the gensymmed name (var"#f##kw"
orgetfield(Base, Symbol("#kw##sum"))
) - On Julia 1.4+, SnoopCompile will write precompile directives for keyword-body functions
(sometimes called the "implementation" function) that look them up by an algorithm that
doesn't depend on the gensymmed name. For example,
For files that have precompile statements for keyword-body functions, the
let fbody = try __lookup_kwbody__(which(printstyled, (String,Vararg{String,N} where N,))) catch missing end if !ismissing(fbody) precompile(fbody, (Bool,Symbol,typeof(printstyled),String,Vararg{String,N} where N,)) end end
__lookup_kwbody__
method is defined at the top of the file generated bySnoopCompile.write
. - Function generators are looked up in a gensym-invariant manner with statements like
precompile(Tuple{typeof(which(FuncKinds.gen2,(Int64,Any,)).generator.gen),Any,Any,Any})
- Anonymous functions and inner functions are looked up inside an
isdefined
check, to prevent errors when the precompile file is used on a different version of Julia with different gensym numbering.
Other changes:
- A convenience utility,
timesum
, was introduced (credit to aminya)