split path recording and best cost functions for big gainz use i32 instead of i64 positions to shrink data structures for some gainz