stan-dev / stan-dev/docs

improving reduce_sum documentation

Open
#347 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
43
Forks
133
Avg merge
11h 32m
Merged PRs (30d)
4

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reduce_sum documentation entry and review the linked video at 17:46 and the post discussion for the performance guidance described in the issue. Update the documentation to explain how shared arguments are passed and why slicing parameters can improve performance, then verify that the explanation addresses the reported gap.

Written by the indexing model from the issue text.

Assessment

Tech stack
tex
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.