Is there a performance penalty for using threading macros in scittle? (re when to use transducers, etc for performance optimization) https://clojurians.slack.com/archives/C03S1L9DN/p1726612065946789?thread_ts=1726598503.958429&cid=C03S1L9DN
The performance penalty is only paid once, so if you have a function that uses the threading macro, you only pay a little bit of time when the function's code is analyzed, but not when it's executed
Ok, so that performance penalty would not scale by the amount of functions in a given thread. Just the fact of a threading macro in a fn, means one “penalty” for that function, at analysis (interpretation) time. Is that right?
well, actually the analysis phase is done once, but interpretation is done many times on the result of the analysis
just think of analysis as compilation and interpretation as a way to run the output of the "compilation"
Ok thanks. So during analysis (“compilation”) the threading macros are substituted, and there is no further penalty per use. At that point, it is like I wrote the code without threading? Per the cljs thread; It sounds like I probably should not fret over using threading macros, unless there is a blatant performance issue.. And even then I would probably be more focused on other aspects (lazyness), not the inclusion of threading macro itself.