In the version of Kruskal described above, sorting is the bottleneck.
But, some applications use CONNECTED and JOIN for other things, so it's worth making them fast.