  We describe the computational infrastructure for end-to-end Bayesian CMB
analysis implemented by the BeyondPlanck collaboration. This code is called
commander3, and provides a statistically consistent framework for global
analysis of CMB and microwave observations, and may be useful for a wide range
of legacy, current, and future experiments. The paper has three main goals.
Firstly, we provide a high-level overview of the existing code base, aiming to
guide readers who wish to extend and adapt the code according to their own
needs, or to reimplement it from scratch in a different programming language.
Secondly, we discuss some critical computational challenges that arise within
any global CMB analysis framework, for instance in-memory compression of
time-ordered data, FFT optimization, and parallelization and load-balancing.
Thirdly, we quantify the CPU and RAM requirements for the current BeyondPlanck
analysis, and find that a total of 1.5 TB of RAM is required for efficient
analysis, and the total cost of a full Gibbs sample is 170 CPU-hrs, including
both low-level processing and high-level component separation, which is well
within the capabilities of current low-cost computing facilities. The existing
code base is made publicly available under a GNU General Public Library (GPL)
license.
