What's better for preformance .. script handling multi objects or each script handel it's object

So , I was trying to do some outline for objects when I hover on them ,
however I was stuck at something I can do a script that has Update function and checks If the ray collided with object then I can outline it ,
the second method to add script to all the objects and they wont have update function they will have OnMouseDown , OnMouseExit , As I understand the OnMouseDown and OnMouseExit is better that update that works all the time ,
is that ture ? , Like what will be the best performance to achieve this ?

it depends a lot of on the scene complexity, but I think OnMousexxx will give more predictable performance. It is linear to amount of objects receiving the events.