PT - JOURNAL ARTICLE AU - Ben Bettisworth AU - Stephen A. Smith AU - Alexandros Stamatakis TI - Lagrange-NG: The next generation of Lagrange AID - 10.1101/2022.04.19.488734 DP - 2022 Jan 01 TA - bioRxiv PG - 2022.04.19.488734 4099 - http://biorxiv.org/content/early/2022/04/20/2022.04.19.488734.short 4100 - http://biorxiv.org/content/early/2022/04/20/2022.04.19.488734.full AB - Computing ancestral ranges via the Dispersion Extinction and Cladogensis (DEC) model of biogeography is characterized by an exponential number of states relative to the number of regions considered. This is because the DEC model requires computing a large matrix exponential, which typically accounts for up to 80% of overall runtime. Therefore, the kinds of biogeographical analyses that can be conducted under the DEC model are limited by the number of regions under consideration. In this work, we present a completely redesigned efficient version of the popular tool Lagrange which is up to 2.5 times faster, which we call Lagrange-NG (Next Generation). We further reduce time-to-completion by introducing a multi-grained parallelization approach, achieving a total parallel speedup of 8.5 over Lagrange on a machine with 8 cores. In order to validate the correctness of Lagrange-NG, we also introduce a novel metric on range distributions for trees in order to assess the difference between any two range inferences. Finally, Lagrange-NG exhibits substantially higher adherence to coding quality standards. It improves a respective software quality indicator as implemented in the SoftWipe tool from average (5.5; Lagrange) to high (7.8; Lagrange-NG). Lagrange-NG is freely available under GPL2.Competing Interest StatementThe authors have declared no competing interest.