Catwalk.jl: An adaptive dispatch optimizer
Catwalk.jl: An adaptive dispatch optimizer
K. Schäffer
TLDR
Catwalk.jl was designed for situations when both composability and runtime polymorphism is required, and some runtime com- pilation overhead is acceptable for speeding up dynamic dispatch in hot loops.
Abstract
Catwalk.jl is a JIT compiler implemented as a Julia library that generates optimized dispatch code based on statistical profiling. Unlike typical JIT compilers it requires some integration work from its users, allowing it to completely eliminate the need of complex deoptimization logic. It is able to compile new type- stabilized routes or reorder existing ones if the distribution of dispatched types changes during runtime and the customizable cost model predicts significant speedup compared to the best version that was previously compiled. Catwalk.jl was designed for situations when both composability and runtime polymorphism is required, and some runtime com- pilation overhead is acceptable for speeding up dynamic dispatch in hot loops.
