Understand the performance differences between several languages, and illustrate symantic differences between the languages.
Languages being compared:
- 1.2M Accounts
- 10M Transactions
Machine | C# | Rust | PureScript | Haskell | Elixir |
---|---|---|---|---|---|
Alfredo | 42s | 18s | 378s | 156s | 185s |
Dave | 49s | 20s | 334s | 184s | 322s |
Relative (Apprx.) | 1 | ½ | 8 | 3.5 | 5 |
(Memory) | 4 GB | 1.6 GB | x | 12 GB | 3 GB |
./docker-build-test-images.sh
./docker-test-runner.sh
On linux it looks like atop might be a good tool
- Pros
- Performance without optimization
- Cons
- Large holes in logic - potential failure points
- Code
- Running:
dotnet build; time dotnet run
- Pros
- Correctness
- Tool ecosystem
- Cons
- Borrow checker / need to understand memory layout
- Lack of libraries
- Code
- Running:
cargo build --release; time cargo run --release
- Pros
- Correctness
- Cons
- Performance concerns on large datasets (not because of Node)
- Code
- Running: `pulp build; time node -e "require('output/Main').main()"
- Do Account\Transaction problem
- Look at record syntax
- What kind of speed to we get?
- Code
- Running:
stack build --fast; time stack run
- Pros
- Concurrent
- Fault-tolerant
- Clusteable
- Cons
- Dynamic
- Static types (Dyalizer) are an optional add-on
- Code
- Running:
mix deps.get; mix clean; MIX_ENV=prod mix release;mv _build/prod/rel/test_elixir . ; ./test_elixir/bin/test_elixir foreground