> For long function chains or callbacks that stack up, breaking up the chain into smaller groups and using a well-named variable
> Is the second one marginally less efficient?
> Yes.
No, both versions are just as efficient:
In both versions, the same objects are allocated, stored on the heap, and garbage collected. The difference in efficiency comes down to the compiler.
For the second version, the compiler should observe that each variable is only used immediately after it's declared, and thus treat those objects as "out-of-scope" as if it's a chained function call.