Sphere collider Trigger or (vector3.Distance) Proximity via Function Update?

Hi all,

Which way is faster to find the distance between two objects through a function update or a sphere collider with a trigger? If i use a trigger, i could link my proximity variable to the sphere radius ... so it is exactly the same in terms of functionality. But does a trigger has some internal functionality for not searching all the time for objects ? I want to use that for about a hundred objects so it will be nice if i do it the quick way. Sorry if it has been posted somewhere else but I searched a bit .

function Update() 
{

        var dist = Vector3.Distance(cameraObj.transform.position, transform.position);

        if (dist < proximity) 
        {

               TextOn = true;
        }

        else 
        {
               TextOn = false;

        }       
}

the best way of testing these cases is to create many objects (1000 or more) and test the situation with both solutions. you can see the framerate and CPU usage and the profiler if you have the pro version to see what is faster.

in this case i think colliders are fast because sphere colliders are the fastest colliders and if you want to check many objects against one trigger it's really faster than execute it in Update of all objects. the colliders code is not in scripts so it's faster than using scripts to do the same thing. sphere colliders just subtract theier center from each other and check the radius. it's just what you do in your script.

Using physics is a lot more optimized than a bunch of scripts running.