Git Product home page Git Product logo

logicchains / lpathbench Goto Github PK

View Code? Open in Web Editor NEW
153.0 153.0 46.0 215 KB

Benchmarks of the longest path problem in various languages

License: MIT License

C 29.71% Clojure 3.02% C++ 8.85% Crystal 1.41% C# 2.91% D 2.70% Dart 2.06% Fortran 7.48% F# 2.19% Go 6.20% Haskell 2.66% JavaScript 5.12% Julia 1.57% Java 5.38% Common Lisp 3.43% Lua 4.62% Factor 2.37% Shell 3.77% Makefile 3.08% Nim 1.48%

lpathbench's People

Contributors

arthurprs avatar burntpizza avatar cmack avatar def- avatar dmitshur avatar dvolk avatar dynamical-butter-system avatar frol avatar gasche avatar git-emissary avatar hokkos avatar jessekphillips avatar jpreiss avatar lemmi avatar lgeek avatar logicchains avatar lpw25 avatar mahkoh avatar masterduke17 avatar mattrajca avatar munificent avatar onionhammer avatar philnguyen avatar phiresky avatar scorpiion avatar singularperturbation avatar thebosz avatar x4u avatar yazd avatar zackangelo avatar

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

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?

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?

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?

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

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.

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.