8<---------------------------------------- // Go hello world. package main import "fmt" func main() { print("Hello World!\n") var i = 4 var j = i for j < 100000000 { j = fib(i) i = i + 1 } fmt.Printf("fibonacci(%d): %d\n", i, j) } func fib(n int) int { if n <= 1 { return 1 } return fib(n-1) + fib(n-2) } 8<---------------------------------------- platform: Linux 5.15.0-46-generic x86_64 GNU/Linux compiler version: tinygo version 0.25.0 linux/amd64 (using go version go1.19 and LLVM version 14.0.0) bench: bench-wasm compile command: tinygo build -o hello.wasm -target wasi compile time: 4.16s compile max memory: 177592 KB executable size: 428,547 Hello World! fibonacci(40): 102334155 execution time: 0.61s bench: bench-wasm-optimised compile command: tinygo build -o hello.wasm -no-debug -target wasi compile time: 3.80s compile max memory: 185520 KB executable size: 191,265 Hello World! fibonacci(40): 102334155 execution time: 0.62s bench: bench-x86-64-linux compile command: tinygo build -o hello compile time: 1.91s compile max memory: 178532 KB executable size: 503,640 Hello World! fibonacci(40): 102334155 execution time: 0.39s bench: bench-x86-64-linux-optimised compile command: tinygo build -o hello -no-debug compile time: 1.94s compile max memory: 166500 KB executable size: 140,056 Hello World! fibonacci(40): 102334155 execution time: 0.41s