Learning based Methods for Code Runtime Complexity Prediction
Not on the map. Why?
Abstract (arXiv)
Predicting the runtime complexity of a programming code is an arduous task. In fact, even for humans, it requires a subtle analysis and comprehensive knowledge of algorithms to predict time complexity with high fidelity, given any code. As per Turing's Halting problem proof, estimating code complexity is mathematically impossible. Nevertheless, an approximate solution to such a task can help developers to get real-time feedback for the efficiency of their code. In this work, we model this problem as a machine learning task and check its feasibility with thorough analysis. Due to the lack of any open source dataset for this task, we propose our own annotated dataset CoRCoD: Code Runtime Complexity Dataset, extracted from online judges. We establish baselines using two different approaches: feature engineering and code embeddings, to achieve state of the art results and compare their performances. Such solutions can be widely useful in potential applications like automatically grading coding assignments, IDE-integrated tools for static code analysis, and others.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). First posted on arXiv 4 Nov 2019.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 1; 2024: 1; 2025: 3.
5 papers.
- 2024ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?cited by 25
- 2023TASTY: A Transformer based Approach to Space and Time complexitycited by 3
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Qualitycited by 3
- 2025TCProF: Time-Complexity Prediction SSL Frameworkcited by 0
- 2025MEC3O: Multi-Expert Consensus for Code Time Complexity Predictioncited by 0
- 2025MEC3O: Multi-Expert Consensus for Code Time Complexity Prediction10 Oct 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025
- 2025TCProF: Time-Complexity Prediction SSL Framework10 Feb 2025
- 2024ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?19 Jul 2024
- 2023TASTY: A Transformer based Approach to Space and Time complexity6 May 2023