Floyd-Warshall has three nested loops, each running times. The innermost loop body is . Total time: . This is slower than single-source Dijkstra (), but faster than running Dijkstra times on dense graphs.
For sparse graphs with many queries, Floyd-Warshall is often simpler. The simplicity of the code makes it a practical choice when or so. Beyond that, consider Johnson's algorithm.
Space complexity is for the data structures used.