Without any changes the C code running on a 2GB Pi 4 yieldsScratchy meowed that storing the distance along the active route spoils the cache and commented out my performance tuning. To further save memory the coordinates were changed from double to float. I'm pretty sure that cat is as spoiled as the cache, but the computation did run a few seconds faster after that.I'll clean up my C code before posting it. I wonder if it will run on the Pi 4.
Not precomputing D might also save memory so the computation can be performed on a Pi.Code:
tsp -- Traveling salesman problem using ruin and recreateFNAME=mona-lisa100K.tspcright(R)=100000cleft(R)=100000dright(R)=6187394.684765dleft(R)=6187394.684765ops=704982704Total computation time 82.4101 seconds.Rate is 8.55456 Mops/sec.
Code:
tsp -- Traveling salesman problem using ruin and recreateFNAME=mona-lisa100K.tspcright(R)=100000cleft(R)=100000dright(R)=6187394.684765dleft(R)=6187394.684765ops=704982704Total execution time 494.935 seconds.Rate is 1.42439 Mops/sec.Statistics: Posted by ejolson — Fri Aug 29, 2025 3:02 am