logicchains/LPATHBench — pull request #47 by zwparchman (2014-12-21 23:35:27+00:00)
Title: Updated c++

The c++ is now running with run times of 17 ms or 44 ms for g++5.0 and clang++3.5.0-4 respectively.

It will not run successfully if compiled with gcc-4.9 with any optimization level about -O0. This was caused by changing rsp by about 22 billion and accessing that memory causing a segfalt. This pushes it outside of what I'm willing to deal with, but today's from source gcc build works with some optimization levels including -O9 and -O3.

Clang just works if you are unwilling to build gcc from source.

------------------------------
As for the performance change, it just caches the results to every call to "cache" witch replaces getLongestPath(...).
Given larger data sets this will not be viable, but for the one given it works fine. Given a large enough machine likely will for problems larger than the other implementations can complete in a reasonable time until their algorithms are updated.