What is better to use
component.find("myId").getElement(); in terms of performance? What will be faster?
Regardless of performance, you should use
component.find. Document query selectors aren't recommended in lightning, whereas
component.find has explicit support:
Valid DOM Access
The following methods are valid DOM access because the elements are created by
Returns the elements in the DOM rendered by the component.
Returns the div and button components, identified by their aura:id attributes.
Returns the DOM element for the div as c:domLocker created the div.
Returns the name of the button that dispatched the event; in this case, myButton.
Notice the complete absence of query selectors in the enumeration of valid methods to access the DOM. It's not a supported approach, strictly speaking, even if it may work today.