Analyses of different compiler and different languages
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

2.2 KiB

## Compiler Analyses

<!-- Please edit the `README.md.tmpl` file instead of the `README.md` -->

These are tables that analyse different compilers for different languages.

#### Build Time

|Language/Compiler|Command|Time|
|-----------------|-------|----|
{{ $command := "tcc code/hello_world.c" }}|C (`tcc`)|`{{ $command }}`|`{{ $command | calcTime }}`|
{{ $command := "gcc code/hello_world.c" }}|C (`gcc`)|`{{ $command }}`|`{{ $command | calcTime }}`|
{{ $command := "cc code/hello_world.c" }}|C (`cc`)|`{{ $command }}`|`{{ $command | calcTime }}`|
{{ $command := "python3 -m py_compile code/hello_world.py" }}|Python|`{{ $command }}`|`{{ $command | calcTime }}`|
{{ $command := "go build code/hello_world.go" }}|Go|`{{ $command }}`|`{{ $command | calcTime }}`|
{{ $command := "rustc code/hello_world.rs" }}|Rust|`{{ $command }}`|`{{ $command | calcTime }}`|

#### Run Time

|Language/Compiler|Command|Time|
|-----------------|-------|----|
{{ "tcc code/hello_world.c" | run_command }}{{ $command := "./a.out" }}|C (`tcc`)|`{{ $command }}`|`{{ $command | calcTime }}`|
{{ "gcc code/hello_world.c" | run_command }}{{ $command := "./a.out" }}|C (`gcc`)|`{{ $command }}`|`{{ $command | calcTime }}`|
{{ "cc code/hello_world.c" | run_command }}{{ $command := "./a.out" }}|C (`cc`)|`{{ $command }}`|`{{ $command | calcTime }}`|
{{ $command := "python3 code/hello_world.py" }}|Python|`{{ $command }}`|`{{ $command | calcTime }}`|
{{ "go build code/hello_world.go" | run_command }}{{ $command := "./hello_world" }}|Go|`{{ $command }}`|`{{ $command | calcTime }}`|
{{ "rustc code/hello_world.rs" | run_command }}{{ $command := "./hello_world" }}|Rust|`{{ $command }}`|`{{ $command | calcTime }}`|

#### Binary Size

|Language/Compiler|Size|
|-----------------|----|
{{ "tcc code/hello_world.c" | run_command }}|C (`tcc`)|`{{ "a.out" | calcSize }}`|
{{ "gcc code/hello_world.c" | run_command }}|C (`gcc`)|`{{ "a.out" | calcSize }}`|
{{ "cc code/hello_world.c" | run_command }}|C (`cc`)|`{{ "a.out" | calcSize }}`|
{{ "python3 -m py_compile code/hello_world.py" | run_command }}|Python|`{{ "code/__pycache__/*" | calcSize }}`|
{{ "go build code/hello_world.go" | run_command }}|Go|`{{ "hello_world" | calcSize }}`|
{{ "rustc code/hello_world.rs" | run_command }}|Rust|`{{ "hello_world" | calcSize }}`|