"And what's the fastest way to check the true distance between x1,y1,z1 and x2,y2,z2? "
The ONLY way to check the TRUE distance is with a square root. There's no faster way.
You can use approximations of course. The worse the approximation the faster it will be.
I would not bother concerining myself with it though unless you're doing it hundreds, perhaps thousands, or even tens of thousands of times a loop. I use squared distances when I can to compare two distances, but when I need a true distance I use a square root, and I don't worry about it unless I actually detect that my game is running too slowly and then I look for places I can make big optimizations. So if I had a loop running 100,000 times a frame with a square root in it I might look at using an approximate distance function, but more likely I'd try to find a way not to run that loop 100,000 times instead.
The ONLY way to check the TRUE distance is with a square root. There's no faster way.
You can use approximations of course. The worse the approximation the faster it will be.
I would not bother concerining myself with it though unless you're doing it hundreds, perhaps thousands, or even tens of thousands of times a loop. I use squared distances when I can to compare two distances, but when I need a true distance I use a square root, and I don't worry about it unless I actually detect that my game is running too slowly and then I look for places I can make big optimizations. So if I had a loop running 100,000 times a frame with a square root in it I might look at using an approximate distance function, but more likely I'd try to find a way not to run that loop 100,000 times instead.