3 ms·
That's an implementation detail. Consider JS. The builtin implementation is naive and chaining calls results in multiple passes over the array. Lodash is diff
by hajile 5y ago
That's an implementation detail.
Consider JS. The builtin implementation is naive and chaining calls results in multiple passes over the array.
Lodash is different. It uses an iterator internally, so chaining isn't much of a performance difference (just the overhead of the function calls which are probably inlined by most JITs anyway).
I see no reason why Swift couldn't (or shouldn't) do this in a future version.