improving reduce_sum documentation
Summary:
The reduce_sum documentation is incomplete. It does not briefly mention how things should be done to really gain performance. For example that shared arguments are copied if they are parameters otherwise they are passed as reference.
Basically, add what is discussed in minute 17:46 here: https://www.youtube.com/watch?v=d5gPjajxN9A&list=PLCrWEzJgSUqzI3goQEAKkDsHg72inmqbe&index=13
Why? Well for example until I did not see this video I was unable to figure out that slicing the parameters rather than the data provided a speed up around 1 thousand times... and I was not able to figure this from the documentation, only from this video.
Post discussion https://discourse.mc-stan.org/t/measuring-and-comparing-computational-performance-in-stan-with-different-compilation-alternatives-using-reduce-sum-does-not-bring-any-advantage/21340/18?u=jmaronas
Current Version:
v2.26.1
Thanks for the issue! Moving to the docs repo.