sci

ericdallo 2025-05-12T14:31:57.838409Z

This may sound like a dumb question, but do transducers perform better than common filter/map iterations when the code is interpreted by sci?

ericdallo 2025-05-12T14:32:58.987729Z

or in the end how sci implements it is the same somehow?

borkdude 2025-05-12T14:33:40.919489Z

it's not a dumb question, but I don't think it matters, there is no interpreter overhead for lazy seqs vs transducers I think, since the only part that's interpreted is the higher order function argument and this is executed the same number of times with lazy seqs vs transducers

ericdallo 2025-05-12T14:35:23.192839Z

oh interesting

ericdallo 2025-05-12T14:35:56.531689Z

I built a clojure-lsp custom linter that is using sci, and did some perf improvements using transducers, and noticed is the same perf, so I was wondering if it was worth it

borkdude 2025-05-12T14:36:23.678289Z

you should just optimize for transducers for the same reasons as in clojure, not because of SCI

ericdallo 2025-05-12T14:36:36.949059Z

makes sense

ericdallo 2025-05-12T14:36:56.698149Z

that was the idea indeed, optimize the coll iterations