100 lines
No EOL
2.5 KiB
Markdown
100 lines
No EOL
2.5 KiB
Markdown
# BUN-test
|
|
|
|
Test bun linux, windows ecc
|
|
|
|
## Test GCC and CLANG with -o3
|
|
|
|
```sh
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ gcc -Wall -O3 Cmatrix.c -o bin/Cmatrix
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ ./bin/Cmatrix
|
|
Time measured: 12.0505566200 seconds.
|
|
```
|
|
|
|
```sh
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ clang -Wall -O3 Cmatrix.c -o bin/Cmatrixclang
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ ./bin/Cmatrixclang
|
|
Time measured: 11.8433468890 seconds.
|
|
```
|
|
|
|
## Tempi BUN + ( TinyCC compilazione + Esecuzione ) + exec GCC lib.so
|
|
|
|
```sh
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ bun run index.js
|
|
TinyCC Execution Time: 39841.047652ms
|
|
JavaScript Execution Time: 151445.86563ms
|
|
C Execution Time: 11306.60097ms
|
|
```
|
|
|
|
|
|
## GCC senza ottimizzazioni ( -O0 )
|
|
|
|
```sh
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ bun run index.js
|
|
C Execution Time: 2210.778096ms
|
|
TinyCC Execution Time: 9515.602825ms
|
|
JavaScript Execution Time: 17464.264817ms
|
|
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ gcc -Wall -O0 -shared matrix.c -o bin/matrix03.so
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ bun run index.js
|
|
C Execution Time: 10084.689972ms
|
|
TinyCC Execution Time: 9475.667019999999ms
|
|
JavaScript Execution Time: 17810.901714ms
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$
|
|
```
|
|
|
|
|
|
## SetN = 2000
|
|
|
|
```sh
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ gcc -Wall -O3 -shared matrix.c -o bin/matrix03.so
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ bun run index.js
|
|
C Execution Time: 48145.866321ms
|
|
TinyCC Execution Time: 102745.97170400001ms
|
|
JavaScript Execution Time: 397706.84388400003ms
|
|
```
|
|
|
|
## 1500
|
|
```sh
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ bun run index.js
|
|
C Execution Time: 10959.741538999999ms
|
|
TinyCC Execution Time: 36574.850994ms
|
|
JavaScript Execution Time: 137350.96834400002ms
|
|
```
|
|
|
|
## 1000
|
|
|
|
```sh
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ gcc -Wall -O3 -shared matrix.c -o bin/matrix03.so
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ bun run index.js
|
|
C Execution Time: 2267.1350589999997ms
|
|
TinyCC Execution Time: 10732.041204000001ms
|
|
JavaScript Execution Time: 19499.030189999998ms
|
|
```
|
|
|
|
|
|
## test.sh con n = 300
|
|
|
|
```sh
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ bash test.sh
|
|
Bun Execution Results:
|
|
Mean Time (ms): 241.13
|
|
Standard Deviation: 21.91
|
|
|
|
Node Execution Results:
|
|
Mean Time (ms): 274.54
|
|
Standard Deviation: 12.86
|
|
|
|
```
|
|
|
|
|
|
## test.sh con n = 500
|
|
```sh
|
|
pansi21@legolas-pX:~/Scrivania/BUN-test$ bash test.sh
|
|
Bun Execution Results:
|
|
Mean Time (ms): 1030.54
|
|
Standard Deviation: 36.02
|
|
|
|
Node Execution Results:
|
|
Mean Time (ms): 797.34
|
|
Standard Deviation: 30.81
|
|
``` |