News for hackers. Stuff that matters.
Re:ARMv7 vs. x86-64: Pathfinding benchmark of C++, D, Go, Ni... by lispm on Saturday December 20, 2014 @08:14AM (#8776553)

    (defun get-longest-path (nodes node-id visited)
      (declare (optimize (speed 3) (space 0) (debug 0) (safety 0)
                         (compilation-speed 0)
                         #+lispworks (fixnum-safety 0))
               (type fixnum node-id)
               (type (vector node) nodes)
               (type (vector atom) visited))
      (setf (aref visited node-id) t)
      (Let ((max (loop for neighbour of-type route across (node-neighbours (aref nodes node-id))
                       unless (aref visited (route-dest neighbour))
                       maximize (the fixnum
                                     (+ (the fixnum (route-cost neighbour))
                                        (the fixnum (get-longest-path nodes (route-dest neighbour) visited)))))))
        (declare (fixnum max))
        (setf (aref visited node-id) nil)
        max))
Above Common Lisp version improves the runtime from 8.5 to 3.6 seconds in SBCL and from 30 seconds to 2 seconds in LispWorks 64bit. Computer: i7 Mac mini.
Re:ARMv7 vs. x86-64: Pathfinding benchmark of C++, D, Go, Ni... by lispm on Saturday December 20, 2014 @06:29PM (#8778353)
I've created a version with some explanations about performance issues...

https://gist.github.com/lispm/e9372894519f8e6feae1

Re:ARMv7 vs. x86-64: Pathfinding benchmark of C++, D, Go, Ni... by logicchains on Saturday December 20, 2014 @08:21AM (#8776570)
Nice, re-running the benchmark with the new code now.

*Edit: and, it's done.

Re:ARMv7 vs. x86-64: Pathfinding benchmark of C++, D, Go, Ni... by lispm on Saturday December 20, 2014 @10:06AM (#8776760)
here is a much faster version:

https://gist.github.com/lispm/6066e1eeadf943910c47

You might want to adapt it...

Re:ARMv7 vs. x86-64: Pathfinding benchmark of C++, D, Go, Ni... by logicchains on Saturday December 20, 2014 @10:22AM (#8776806)
I'm off to bed now, I'll pull it in the morning.