Make first(g) more efficient: extract only 1 value
Before adoption: this commit came in with the history the project adopted, so no landing records it.
first(g) was extracting two values, which, if g is slow, made first(g) slow. And if the second extraction were to throw an error, then first(g) would throw that error, which is clearly not the right thing to do. Besides that, first(g) was allocating garbage, which it no longer does.
authored by Nicolas Williams · committed by Nicolas Williams · parent e24af3c · Browse files · 2 files+6 added−1 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+6 added−1 removed
- tests:+5 added−0 removed
- other:+1 added−1 removed