-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathresults.txt
42 lines (35 loc) · 1.39 KB
/
results.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Python: 30 Lines
time python count_lines_in_files.py ~/Desktop/Linux/linux-6.5.8 ".*\.c$"
23172814
Macbook (Intel): time real 24.993 user 4.821 sys 4.587
C: 78 Lines (char-based)
gcc -o count_lines_in_files count_lines_in_files.c
time ./count_lines_in_files ~/Desktop/Linux/linux-6.5.8 ".*\.c$"
23172811
Macbook (Intel): time real 1m7.825 user 29.383 sys 7.395s
gcc -O3 -o count_lines_in_files count_lines_in_files.c
time ./count_lines_in_files ~/Desktop/Linux/linux-6.5.8 ".*\.c$"
23172811
Macbook (Intel): time real 31.59 user 26.617 sys 2.484
C: 85 Lines (block-based)
gcc -O3 -o count_lines_in_files_block count_lines_in_files_block.c
time ./count_lines_in_files_block ../../../linux/linux-6.6.1 ".*\.c$"
23344108 (6.6.1)
Mac Pro (Intel): real 0m5.188s user 0m0.723s sys 0m3.174s
C++: 52 Lines
g++ -std=c++17 -o count_lines count_lines.cpp
time ./count_lines ~/Desktop/Linux/linux-6.5.8 ".*\.c$"
23172814
Macbook (Intel): real 35.479 user 32.142 sys 2.321
g++ -O3 -std=c++17 -o count_lines count_lines.cpp
time ./count_lines ~/Desktop/Linux/linux-6.5.8 ".*\.c$"
23172814
Macbook (Intel): real 6.997 user 4.189 sys 1.951
Java: 37 Lines
time java Main ~/Desktop/Linux/linux-6.5.8 ".*\.c$"
23172814
Macbook (Intel): time real 24.467 user 5.198 sys 6.386
bash: 1 Line
time find ~/Desktop/Linux/linux-6.5.8 -type f -name "*.c" -exec cat {} \; | wc
23172062
Macbook (Intel): time real 1m29.978 user 23.615 sys 43.763