Benchmark
benchmarkMeasure algorithmic time complexity by running code at increasing input sizes and fitting growth curves to estimate Big-O notation.
Instructions
Empirically measure time complexity by running code at increasing input sizes.
Contract: the code must read an integer N from stdin (first line) and do work
sized by N. codecalc runs it at each size in sizes and fits the growth
curve to estimate Big-O (O(1), O(log n), O(n), O(n log n), O(n^2)...).
Example python: 'import sys\nn=int(sys.stdin.readline()); s=0\nfor i in range(n): s+=i\nprint(s)'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Program that reads integer N from stdin's first line and does work sized by N | |
| sizes | No | Comma-separated input sizes to run at, e.g. '100,1000,10000,100000' | 100,1000,10000,100000 |
| timeout | No | Wall-clock seconds allowed per size before that run is killed | |
| language | No | Language `code` is written in; default 'python3' | python3 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||