Code Monkey home page Code Monkey logo

lpathbench's Introduction

LPATHBench

Benchmarks of the longest path problem in various languages

sh runbench.sh 8981 x86 x86html to run the benchmark locally. sh runArmBench.sh 8981 to run the benchmark on an ARM device (edit the script to set the ssh and path settings) sh resdiff.sh x86 arm > diffgraph.html to create the diff table python makeblog.py to make the blog

Where 8981 is the distance of the longest path in the graph

If you want to make a new graph:

/mkgraph -places=NUM_NODES -worldsize=WORLD_SIZE, where NUM_NODES is the number of nodes in the graph, and WORLD_SIZE is the maximum distance between nodes. Each node has at least one connection, to the next node, and will on average have NUM_NODES/2 connections. Graphs are directed; a path of length N from Node1 to Node2 doesn't imply a similar path from Node2 to Node1.

lpathbench's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lpathbench's Issues

Rust code doesn't compile against Rust 1.0

rustc rs.rs -C opt-level=3 -C no-stack-check
rs.rs:24:49: 24:50 error: unexpected token: `]`
rs.rs:24             unsafe { mem::transmute(self.routes[]) }

BTW, I had to change --opt-level=3 to -C opt-level=3 in makefile

Longest path in the graph, or longest path starting from node 0?

I thought I'd write a C implementation to compare to the C++. I decided to start blind rather than looking at the other implementations. Everything I did was taking much longer than your benchmarks, and I was consistently getting a higher number than your code.

Eventually I started printing intermediate values, and I noticed that your answer matched the number I got starting from starting from node 0, but I had been looking for the "longest node in the graph" as the text said. Since I was looping over every start point in keeping with the brute force theme, my runtimes were about 15x what I thought I'd achieve. Finally I looked at the source for some other implementations, and they seemed to be checking only from starts at node 0.

Is this correct, or am I doing something stupid? If correct, perhaps you could change the writeup to reflect this?

Show the path

Hello, i need to find the longest path in a graph. I've found your code and i'm trying to implement something like it on my own. But i can't make it print what is the longest path. It only prints the weight.
Can you show me in your python code how you could print the longest path nodes?

Pattern matching on booleans

I'm not really sure if I'm missing something, but why are you using case to pattern match on a boolean in the Haskell source, when all of those

case isVisited of
  True -> ...
  False -> ...

could be replaced by simple if isVisited then ... else ...?

Results seem to vary between runs

I'm looking at D's results on x86-64 and how they varied today between the runs (1894 1799 2214 1959) without (as far as I could tell) D's code or command line changing between these specific commits.

It might be beneficial to take either the best out of 10 runs, or the average of 10 runs to smooth out the differences and get more consistent results.

Has OCaml on ARM gone away?

The first version of the page I saw had a (slightly disappointing wrt. x86-64) result for OCaml-ARM which I don't see in the writeup anymore. Is it a simple omission or are there technical problems that prevents the results to be recomputed?

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.