Currently the cljs.core/str macro generates direct calls to the cljs.core/str function via a js* inlined call. This means that it never directly dispatches to the correct arity although we know know that it is 1.
This has performance cost and prevents dead code elimination through closure.
The added patch changes the macro to directly dispatch to the correct function instead, yielding improved performance and making it dead code removable.
Also added a benchmark which is a bit useless when run with :advanced as it is removed but still useful for the future I guess.
Currently the
cljs.core/str
macro generates direct calls to thecljs.core/str
function via ajs*
inlined call. This means that it never directly dispatches to the correct arity although we know know that it is 1.This has performance cost and prevents dead code elimination through closure.
The added patch changes the macro to directly dispatch to the correct function instead, yielding improved performance and making it dead code removable.
Also added a benchmark which is a bit useless when run with
:advanced
as it is removed but still useful for the future I guess.