Martin, I don’t see any reason why you could not add to the output another line that contains the Point ID (Point name), if it is just a string of characters in a character array, identified by the same index as the double precision X, Y, and Z data.
Try running the example code with 10000 data points + Checkmate - it's fast, and that's due to Mecej4's suggested binary search. Much larger data set than I ever use - there's only about 800 transmission nodes in the whole of Scotland (and that's the whole transmission network from 400 kV down to 33 kV).