Out if curiosity, I just had a closer look at this: If one subtracts the cost of inputting many items (~20ms for 95000 points here) Point3dList.ClosestPointInList is the substantially faster option. Presumably building the RTree takes some time, but may be worth it in other cases (e.g. finding N closest points, multiple searches):
Also note that not using type hints is another substantial performance improvement in this case. Where the run times increase drastically by using Point3d type hints instead:
250422_ClosestPoint_GHPython_00.gh (12.3 KB)
Anywho, some food for thought ![]()
Edit: One last finding, the performance benefit of not using type hints appears to be substantially less with the new script editor CPython component:
250421_ClosestPoint_GHPython_01.gh (19.7 KB)


