Giter Club home page Giter Club logo

advent-2017-maze-rust-haskell's People

Contributors

chrisdone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

advent-2017-maze-rust-haskell's Issues

Please remove inline pragmas

They don’t make a difference and are source of criticism.

If they do, it should be raised as a compiler ticket perhaps.

Sharing results

My machine

$ uname -a
Linux chalcis 4.4.0-98-generic #121-Ubuntu SMP Tue Oct 10 14:24:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

screenshot from 2017-12-14 10-28-45

screenshot from 2017-12-14 10-28-51

Lower single-threaded perf than a 6700K or 7700K but otherwise good parallelism.

Rust

screenshot from 2017-12-14 10-28-26

Haskell, native codegen

screenshot from 2017-12-14 10-29-21

Haskell, LLVM backend

screenshot from 2017-12-14 10-32-42

screenshot from 2017-12-14 10-32-54

Seems broadly similar. Would need to setup a criterion harness to get a good sample.

LLVM

Using LLVM made the answer twice as fast on my machine:

# Without LLVM
reading file into bytestring took 127.78 µs
parsing 1058 lines took 47.70 µs
25608482, is the answer, it took 85.76 ms

# With LLVM
reading file into bytestring took 134.40 µs
parsing 1058 lines took 31.28 µs
25608482, is the answer, it took 39.82 m

Don't compare against a debug release of Rust

Just to keep comparisons fair, try running the Rust version with cargo run --release. The additional release flag will let cargo know to remove all the debug symbols from the build and do additional optimizations from the final build.

Please also update the Readme to include this.

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.