File tree Expand file tree Collapse file tree 1 file changed +7
-16
lines changed Expand file tree Collapse file tree 1 file changed +7
-16
lines changed Original file line number Diff line number Diff line change 1
1
# Problem 4
2
2
3
- Link: https://leetcode.com/problems/detect-capital/description/
3
+ Link: https://leetcode.com/problems/detect-capital/description/
4
4
5
5
# Benchmarks
6
6
7
- Benchmark 1: python3 problem-4.py
8
-
9
- Time (mean ± σ): 11.1 ms ± 1.3 ms [ User: 9.6 ms, System: 1.7 ms]
10
-
11
- Range (min … max): 9.8 ms … 17.4 ms 260 runs
12
-
13
-
14
-
15
- Benchmark 2: mojo problem-4.mojo
16
-
17
- Time (mean ± σ): 230.1 ms ± 10.1 ms [ User: 249.7 ms, System: 26.7 ms]
18
-
19
- Range (min … max): 215.3 ms … 252.0 ms 13 runs
7
+ | | Time (mean ± σ) | Range (min … max) | Avg.Memory | Runs |
8
+ | --- | --- | --- | --- | --- |
9
+ | Python | 11.1 ms ± 1.3 ms | 9.8 ms … 17.4 ms | 8420k | 260 runs |
10
+ | Mojo | 230.1 ms ± 10.1 ms | 215.3 ms … 252.0 ms | 38820k | 13 runs |
20
11
21
12
# Which performed better?
22
- 'python3 problem-4.py' ran
23
- 20.64 ± 2.52 times faster than 'mojo problem-4.mojo'
13
+
14
+ The Python code ran 20.64 ± 2.52 times faster than the Mojo code
You can’t perform that action at this time.
0 commit comments