Initial commit: Pi calculation benchmark with 34 languages

- Added implementations for: bash, brainfuck, c, cpp, crystal, csharp, d, dart, elixir, erlang, fortran, go, haskell, java, javascript, julia, kotlin, objective-c, scala, typescript, lua, nim, odin, perl, php, python, r, ruby, rust, swift, zig, assembly, vimscript, wolfram
- All implementations use Machin's formula: π/4 = 4*arctan(1/5) - arctan(1/239)
- Build system with ./build.sh, test system with ./test.sh
- Performance testing with ./run_all.sh
- Comprehensive README.md explaining performance differences
- Test framework verifies correctness against known π values
This commit is contained in:
Ein Anderssono
2026-04-23 00:26:18 +02:00
commit 54d2fecee0
182 changed files with 17471 additions and 0 deletions
@@ -0,0 +1 @@
{"version":"1.4.0","project":{"name":"src_fc1c13bc20-63e7ded0de","directory":"/Users/einand/Code/test/scala/src/.scala-build","workspaceDir":"/Users/einand/Code/test/scala/src","sources":["/Users/einand/Code/test/scala/src/print_hej.scala"],"dependencies":[],"classpath":["/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala3-library_3/3.8.3/scala3-library_3-3.8.3.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala-library/3.8.3/scala-library-3.8.3.jar"],"out":"/Users/einand/Code/test/scala/src/.scala-build/.bloop/src_fc1c13bc20-63e7ded0de","classesDir":"/Users/einand/Code/test/scala/src/.scala-build/src_fc1c13bc20-63e7ded0de/classes/main","scala":{"organization":"org.scala-lang","name":"scala-compiler","version":"3.8.3","options":["-sourceroot","/Users/einand/Code/test/scala/src"],"jars":["/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala3-compiler_3/3.8.3/scala3-compiler_3-3.8.3.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala3-interfaces/3.8.3/scala3-interfaces-3.8.3.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/tasty-core_3/3.8.3/tasty-core_3-3.8.3.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala3-library_3/3.8.3/scala3-library_3-3.8.3.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/modules/scala-asm/9.9.0-scala-1/scala-asm-9.9.0-scala-1.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-sbt/compiler-interface/1.10.7/compiler-interface-1.10.7.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala-library/3.8.3/scala-library-3.8.3.jar","/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-sbt/util-interface/1.10.7/util-interface-1.10.7.jar"],"bridgeJars":["/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala3-sbt-bridge/3.8.3/scala3-sbt-bridge-3.8.3.jar"]},"java":{"options":[]},"platform":{"name":"jvm","config":{"home":"/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home","options":[]},"mainClass":[]},"resolution":{"modules":[{"organization":"org.scala-lang","name":"scala3-library_3","version":"3.8.3","artifacts":[{"name":"scala3-library_3","path":"/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala3-library_3/3.8.3/scala3-library_3-3.8.3.jar"}]},{"organization":"org.scala-lang","name":"scala-library","version":"3.8.3","artifacts":[{"name":"scala-library","path":"/opt/homebrew/Cellar/scala/3.8.3/libexec/maven2/org/scala-lang/scala-library/3.8.3/scala-library-3.8.3.jar"}]}]},"tags":["library"]}}
+1
View File
@@ -0,0 +1 @@
{"JAVA_HOME":"/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home","SHELL":"/opt/homebrew/bin/fish","PATH":"/Users/einand/Library/Application Support/Code/User/globalStorage/github.copilot-chat/debugCommand:/Users/einand/Library/Application Support/Code/User/globalStorage/github.copilot-chat/copilotCli:/opt/homebrew/opt/openjdk/bin:/Users/einand/.opencode/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools:/opt/homebrew/bin:/Users/einand/Library/Application Support/Code/User/globalStorage/github.copilot-chat/debugCommand:/Users/einand/Library/Application Support/Code/User/globalStorage/github.copilot-chat/copilotCli:/Users/einand/.cargo/bin:/Users/einand/.vscode/extensions/ms-python.debugpy-2025.18.0-darwin-arm64/bundled/scripts/noConfigScripts"}
+1
View File
@@ -0,0 +1 @@
{"args":["/Users/einand/Code/test/scala/src/print_hej.scala"]}
@@ -0,0 +1 @@
{"scalaRunner":{"cliUserScalaVersion":"3.8.3","cliPredefinedRepository":["file:///opt/homebrew/Cellar/scala/3.8.3/libexec/maven2"],"progName":"scala","skipCliUpdates":true}}
@@ -0,0 +1 @@
{}