Skip to content

Commit

Permalink
add fortran
Browse files Browse the repository at this point in the history
  • Loading branch information
acheronfail committed Dec 18, 2023
1 parent fae18af commit fae19e7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build
results
*.class
Binary file removed count.class
Binary file not shown.
8 changes: 8 additions & 0 deletions count.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
program count
integer :: i
do while (i < 1000000000)
i = i + 1;
end do

print *, i
end program count
3 changes: 2 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ setup:
#!/usr/bin/env bash
set -euxo pipefail
if [ ! -z "${CI:-}" ]; then
sudo apt-get install build-essential cargo clang curl jq moreutils nodejs rustc
sudo apt-get install build-essential cargo clang curl gfortran jq moreutils nodejs rustc
cargo install timers
cargo install hyperfine
cargo install ripgrep --features 'pcre2'
Expand All @@ -24,6 +24,7 @@ build: prepare
gcc -O3 ./count.c -o {{b}}/c-gcc
clang -O3 ./count.c -o {{b}}/c-clang
rustc -C opt-level=3 ./count.rs -o {{b}}/rust
gfortran -O3 ./count.f90 -o {{b}}/fortran
javac count.java
echo "#!/usr/bin/env -S java count" > {{b}}/java
echo "#!/usr/bin/env -S ruby \n$(cat count.rb)" > {{b}}/ruby
Expand Down

0 comments on commit fae19e7

Please sign in to comment.