This study provides a comprehensive evaluation of the computational performance of R, MATLAB, Python, and Julia for spatial and spatio-temporal modelling, focusing on high-dimensional datasets typical in geospatial statistical analysis. We benchmark each language across key tasks, including matrix manipulations and transformations, iterative programming routines, and Input/Output processes, all of which are critical in environmetrics. The results demonstrate that MATLAB excels in matrix-based computations, while Julia consistently delivers competitive performance across a wide range of tasks, establishing itself as a robust, open-source alternative. Python, when combined with libraries like NumPy, shows strength in specific numerical operations, offering versatility for general-purpose programming. R, despite its slower default performance in raw computations, proves to be highly adaptable; by linking to optimized libraries like OpenBLAS or MKL and integrating C++ with packages like Rcpp, R achieves significant performance gains, becoming competitive with the other languages. This study also provides practical guidance for researchers to optimize R for geospatial data processing, offering insights to support the selection of the most suitable language for specific modelling requirements.
{"title":"Computational Benchmark Study in Spatio-Temporal Statistics With a Hands-On Guide to Optimise R","authors":"Lorenzo Tedesco, Jacopo Rodeschini, Philipp Otto","doi":"10.1002/env.70017","DOIUrl":"https://doi.org/10.1002/env.70017","url":null,"abstract":"<p>This study provides a comprehensive evaluation of the computational performance of <span>R</span>, <span>MATLAB</span>, <span>Python</span>, and <span>Julia</span> for spatial and spatio-temporal modelling, focusing on high-dimensional datasets typical in geospatial statistical analysis. We benchmark each language across key tasks, including matrix manipulations and transformations, iterative programming routines, and Input/Output processes, all of which are critical in environmetrics. The results demonstrate that <span>MATLAB</span> excels in matrix-based computations, while <span>Julia</span> consistently delivers competitive performance across a wide range of tasks, establishing itself as a robust, open-source alternative. <span>Python</span>, when combined with libraries like <span>NumPy</span>, shows strength in specific numerical operations, offering versatility for general-purpose programming. <span>R</span>, despite its slower default performance in raw computations, proves to be highly adaptable; by linking to optimized libraries like <span>OpenBLAS</span> or <span>MKL</span> and integrating <span>C++</span> with packages like <span>Rcpp</span>, <span>R</span> achieves significant performance gains, becoming competitive with the other languages. This study also provides practical guidance for researchers to optimize <span>R</span> for geospatial data processing, offering insights to support the selection of the most suitable language for specific modelling requirements.</p>","PeriodicalId":50512,"journal":{"name":"Environmetrics","volume":"36 5","pages":""},"PeriodicalIF":1.5,"publicationDate":"2025-06-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://onlinelibrary.wiley.com/doi/epdf/10.1002/env.70017","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"144511146","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"环境科学与生态学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}