Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Interestingly, now that someone submitted a change to the Java implementation, such that it doesn't use classes (unboxing is simulated by using arrays for the data instead), it runs much closer to native speed.


can you explain a little further ?


I think it's easier to read the code:

https://github.com/logicchains/LPATHBench/blob/master/jv.jav...

Instead of a vector of node classes, there's a

    static final int[][] nodes;
Which is used in a similar manner to a vector of node classes, but due to containing primitives (ints) is unboxed.


When "the longest path problem" is reduced to indexed-access to an integer-sequence, does it become a duplicate of fannkuch?

http://benchmarksgame.alioth.debian.org/u64q/performance.php...


and you do not copy the bool array around as it was done in the previous version




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: