GithubHelp home page GithubHelp logo

mpickering / languagecomparison Goto Github PK

View Code? Open in Web Editor NEW

This project forked from concordresearch/languagecomparison

0.0 3.0 0.0 172 KB

Understand the performance differences between several languages, and illustrate semantic differences between the languages.

PureScript 33.59% JavaScript 2.04% Shell 5.20% C# 11.33% Elixir 19.41% Haskell 18.10% Batchfile 0.04% Rust 10.27%

languagecomparison's Introduction

Language Performance Comparison

Purpose

Understand the performance differences between several languages, and illustrate symantic differences between the languages.

Languages being compared:

  1. C#
  2. Rust
  3. PureScript
  4. Haskell
  5. Elixir

Performance Comparison

  • 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

Potential Next Steps

To run a dockerized version of these tests

./docker-build-test-images.sh
./docker-test-runner.sh

On linux it looks like atop might be a good tool

C#

  • Pros
    • Performance without optimization
  • Cons
    • Large holes in logic - potential failure points
  • Code
  • Running: dotnet build; time dotnet run

Rust

  • Pros
    • Correctness
    • Tool ecosystem
  • Cons
    • Borrow checker / need to understand memory layout
    • Lack of libraries
  • Code
  • Running: cargo build --release; time cargo run --release

PureScript

  • Pros
    • Correctness
  • Cons
    • Performance concerns on large datasets (not because of Node)
  • Code
  • Running: `pulp build; time node -e "require('output/Main').main()"

Haskell

  • Do Account\Transaction problem
  • Look at record syntax
  • What kind of speed to we get?
  • Code
  • Running: stack build --fast; time stack run

Elixir

  • 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

languagecomparison's People

Contributors

alfredherr avatar gregberns avatar dkoontz avatar srufle avatar

Watchers

James Cloos avatar Matthew Pickering avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.