Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcabbott committed Apr 3, 2021
1 parent b2eef85 commit 6ea234d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ mat1k = rand(3,1000);

On recent versions of Julia, `mapcols` has become much faster, 5-10 times.

FWIW, times on Julia 1.7-dev & and M1 mac, April 2021:

```
@btime mapreduce(fun, hcat, eachcol($mat1k)) # 616.250 μs (2317 allocations: 11.69 MiB)
@btime mapslices(fun, $mat1k, dims=1) # 230.250 μs (7499 allocations: 298.23 KiB)
@btime mapcols(fun, $mat1k) # 26.750 μs (1003 allocations: 140.83 KiB)
@btime MapCols{3}(fun, $mat1k) # 6.067 μs (9 allocations: 47.20 KiB)
@btime MapCols(fun, $mat1k) # 6.217 μs (9 allocations: 47.20 KiB)
@btime ForwardDiff.gradient(m -> sum(mapslices(fun, m, dims=1)), $mat1k); # 70.815 ms (1877210 allocations: 210.64 MiB)
@btime Tracker.gradient(m -> sum(mapcols(fun, m)), $mat1k); # 29.840 ms (598046 allocations: 26.20 MiB)
@btime Tracker.gradient(m -> sum(MapCols{3}(fun, m)), $mat1k); # 25.833 μs (60 allocations: 283.23 KiB)
```

## Other packages

This package also provides Zygote gradients for the Slice/Align functions in
Expand Down

2 comments on commit 6ea234d

@mcabbott
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/33503

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.4 -m "<description of version>" 6ea234d480ed407998e33d99099a15a5854b0980
git push origin v0.2.4

Please sign in to comment.