Why $let is so slow?

Ok, I can reproduce the slowdown, but it doesn’t have anything (or at least much) to do with embedded $let fields. You can see similar slowdown using a single $let with 10 vs 1 variable.

I suspect the slowdown is because for each variable we have to allocate some memory and we probably don’t consolidate that work. Can you confirm that you see the same thing when having a single $let with many variables?

Asya

1 Like