You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This avoids a StackOverflow error, and also turns out to be faster
still, and lets us maintain the ability for map to return a list of a
different eltype than the original, added in #27.
Before:
```julia
julia> @Btime DataStructures.map(x->x*2, $(list((1:1000)...)));
29.705 μs (1745 allocations: 42.89 KiB)
```
After:
```julia
julia> @Btime DataStructures.map(x->x*2, $(list((1:1000)...)));
13.139 μs (1011 allocations: 47.65 KiB)
```
I'm not sure how there are fewer allocations.. But I can see how it'd be
faster, with no recursive function calls.
0 commit comments