Comparison with other frameworks
This page is for modelers who use another framework and are weighing Starsim. Each framework below has a page of its own, showing a model from that framework written both ways, how their results agree, how long each takes, and what works and what does not yet. For importing a model in general, see Import/export in the Starsim docs; for Starsim 3 code, see the migration guide.
How Starsim compares
Each framework with a page here, compared on a model from its own documentation (described in How these numbers were made). Bold marks where Starsim does worse than the original. The times are indicative only: they depend on the machine, its load, threading, and what each time includes, and each framework is timed on its own examples, which play to its strengths. Two times are called about the same if they are within a factor of 2 of each other, or within 0.1 s for a first run (a one-off wait too short to notice) or 1 ms for a rerun (which a fit or a sweep repeats thousands of times); only a bigger difference is called faster or slower.
| Framework | Lines of model code | Time for one run | The switching demo’s checks | Where Starsim is furthest behind today |
|---|---|---|---|---|
| EpiModel | Fewer in both models | Faster in both | 3 of 3 pass | No ERGM terms beyond degree by group and match= properties (no nodemix, absdiff, or gwesp) |
| SimInf | More in both models | About the same in one; slower in the other (SISe3), under the limit | 4 of 5 pass | The speed of the exact solver in a small model (SISe3: 0.55 s against 0.094 s to rerun) |
| odin | Fewer in both | Faster the first time, about the same to rerun | 4 of 5 pass | Many small stochastic runs (1,000 runs in 11.2 s against 1.98 s) |
| epydemix | More in one of two | About the same the first time, faster to rerun | 4 of 5 pass | The US states’ data are read, but not yet published for download |
| MEmilio | Fewer in both | About the same: all under 20 ms, though the rerun is about 20 times slower (0.4–0.6 ms against under 0.1 ms) | 4 of 4 pass | No German county data; no osecirvvs importer |
| flepiMoP | Fewer in both | Faster | 3 of 3 pass | No cluster batch jobs or R post-processing |
| summer2 | Fewer in both | Faster the first time, about the same to rerun once summer2 has compiled | 2 of 2 pass (1 not run) | No sigmoidal scale-up; a live model cannot be imported in the same process |
| Atomica | Fewer in both | Faster | 6 of 7 pass | The tb library workbook fails to import; no spreadsheet interface |
| camdl | Fewer in both | About the same the first time, faster to rerun | 3 of 3 pass | The interventions (SIAs) of an imported model are not translated |
| EMULSION | Fewer in both | Faster | 2 of 5 pass | Importing the quickstart; newborns by prototype give too few animals; births between strata as compartments |
| LASER | Fewer in both | Slower at national scale (England and Wales); faster the first time and about the same to rerun for the hub and spoke, which passes only with a tenth of the agents | 2 of 3 pass | Speed per agent at national scale |
| NumPy | Fewer | About the same (13 ms against 0.7 ms), under the limit | No demo | Speed for a small model run once |
| Starsim v3 | 4 of 4 pass | Declared diseases as agents are slower than code |
How these numbers were made
The models. Each framework’s examples were taken from its own documentation or repository, run in that framework’s own environment, and translated into Starsim by hand. The original, the translation, and a script that compares them are kept in this repository (see about the models), with the original’s reference results. These are the models on each page.
Lines and times. The lingua_franca benchmark command (the benchmark) reads every translation and writes a table of lines of model code and run time, the original against Starsim, with the rows that fail. Starsim’s lines are counted from the translation: not counting blank lines, comments, docstrings, imports, or the if __name__ == '__main__' block, and counting a line over 100 characters twice. The original’s lines are those of its model file (rows of spreadsheets for Atomica, lines of YAML for flepiMoP and EMULSION). Starsim fails on lines if it has more than the original. Time is two numbers, each the best of two rounds: the first run in a new process, not counting importing Starsim or reading the model file, and a rerun of the same built sim, the best of as many as fit in about 3 s. A time fails if Starsim is more than 2 times slower and more than 1 s slower. In the table above, two times are about the same if they are within a factor of 2, or within 0.1 s for a first run or 1 ms for a rerun, and otherwise faster or slower; the verdicts come from the north-star table below, the first run and the rerun each, and lingua_franca benchmark prints them for each framework. They are indicative only: a time from one machine on one day, not a benchmark of each framework at its best, and the frameworks differ in what a time can fairly include (starting a program, compiling, importing a large library). The originals were timed in turn with Starsim in their own environments (what each time includes, such as starting R or compiling, is said on each page). The numbers are from 2 November 2026, on a 20-core x86-64 Linux machine shared with other work, measured twice, with Starsim 4.0.0rc1.
What works and what does not yet. Starsim’s switching demos (tests/switching/ in this repo) take each task that a user of that framework does every week, written in that field’s terms and scaled down to run in seconds, and check it against the original framework’s numbers. Of their 50 checks, 41 pass today, 8 fail, and one needs a framework that cannot be installed alongside Starsim. Each failing check names what blocks it. The demos were built from a review in which an experienced user of each framework tried their routine work in Starsim at their real scale (on 17 October 2026). Numbers on the pages that are not from the demos or the north star are from the translations’ own comparisons (13 and 14 October 2026) or from that review; a time from the review is given with its date. The NumPy page has no translation or demo: its numbers are from its own code, which is run when the docs are built. Starsim’s numbers are for Starsim 4.0.0rc1, as above.
The north-star table
The last run of lingua_franca benchmark (2 November 2026). Each Starsim time is under the fastest set of kernels, which is now Rust for every model; times are for the same run in both frameworks, except as said on each framework’s page. The summary has the table from the latest run.
| Model | Lines: original | Lines: Starsim | First run (s): original | First run (s): Starsim | Rerun (s): original | Rerun (s): Starsim | Fails on |
|---|---|---|---|---|---|---|---|
| atomica/hiv_dyn | 217 | 64 | 0.14 | 0.036 | 0.004 | 0.00045 | – |
| atomica/sir | 62 | 16 | 0.12 | 0.011 | 0.0023 | 0.00023 | – |
| camdl/sir | 30 | 13 | 0.013 | 0.0094 | 0.0056 | 0.00029 | – |
| camdl/stratified | 47 | 16 | 0.023 | 0.014 | 0.013 | 0.00052 | – |
| emulsion/quickstart | 280 | 53 | 1.2 | 0.27 | 1.3 | 0.22 | – |
| emulsion/sir | 81 | 10 | 0.8 | 0.0077 | 0.77 | 0.00026 | – |
| epimodel/hiv | 405 | 58 | 48 | 2.4 | 48 | 2 | – |
| epimodel/sis-network | 13 | 9 | 6.5 | 0.54 | 5.4 | 0.34 | – |
| epydemix/covid19 | 161 | 39 | 0.037 | 0.025 | 0.036 | 0.0013 | – |
| epydemix/sir_kenya | 7 | 14 | 0.0072 | 0.01 | 0.0066 | 0.00039 | lines |
| flepimop/seir_2pop | 42 | 16 | 8.6 | 0.018 | 8.8 | 0.00045 | – |
| flepimop/vaccine_scenarios | 141 | 33 | 23 | 0.84 | 23 | 0.55 | – |
| laser/england_wales | 126 | 46 | 4.2 | 12 | 2.8 | 12 | first, rerun |
| laser/hub_spoke_seir | 50 | 17 | 1.9 | 0.61 | 0.72 | 0.62 | – |
| measles_metapop/seir_districts | 89 | 22 | 0.87 | 0.54 | 0.86 | 0.5 | – |
| memilio/secir | 44 | 14 | 0.00045 | 0.014 | 0.00002 | 0.00043 | – |
| memilio/secir_ageres | 45 | 22 | 0.00082 | 0.02 | 0.00006 | 0.00056 | – |
| odin/seir_array | 53 | 17 | 0.84 | 0.019 | 0.0015 | 0.003 | – |
| odin/stochastic_sir_arrays | 27 | 10 | 0.75 | 0.018 | 0.00096 | 0.0011 | – |
| siminf/sir_herds | 12 | 21 | 0.17 | 0.27 | 0.078 | 0.14 | lines |
| siminf/sise3 | 27 | 39 | 0.31 | 0.92 | 0.094 | 0.55 | lines |
| summer2/seir-age-clinical | 134 | 16 | 2.9 | 0.014 | 0.0003 | 0.00052 | – |
| summer2/sir-age-location | 35 | 12 | 0.8 | 0.012 | 0.00023 | 0.0004 | – |
Lines: 20 of 23 pass. First run: 22 of 23 pass. Rerun: 22 of 23 pass. A pass on time can still be many times slower: memilio/secir is about 20 times slower to rerun, and passes since the difference is under a millisecond. The hub-and-spoke row passes with a tenth of LASER’s agents (each Starsim agent stands for ten people). Each uses its default threads: all the cores for LASER, and for Starsim’s passes over the agents from 200,000 agents (so England and Wales, not the hub and spoke). With one thread each, on England and Wales, LASER took 4.7 s and Starsim 19.7 s.
Further reading
- CRAN Task View: Epidemiology: a curated list of R packages for epidemiology, including transmission models
- The Epiverse: tools: open-source tools for outbreak analytics
- The R Epidemics Consortium (RECON): R packages for outbreak response
- Epicookbook: the same models written in many languages and tools
- SIR models in Julia: one SIR model written in every kind of model (ODE, stochastic, network, agent-based)
- pomp: statistical inference for partially observed Markov processes: fitting mechanistic models to data in R
- NetLogo: agent-based modeling with a graphical interface
- Mesa: general-purpose agent-based modeling in Python
- IDM documentation: EMOD and other models from the Institute for Disease Modeling