What is the fastest method to search the DOM?

Which method(function) is the fastest possible search of an element in the DOM? Or what is the fastest way to find an element in DOM? The point is that there is an element when the mouse hovers over it is the action(function) inside of this function is searched for an element with a specific class and then the action with the found element. That's only if you quickly move the mouse on the element (that is, hover in js triggered mngovenno), for example querySelector fails to find the item and you receive the error, since further action on the found element cannot be made(element not found)
March 19th 20 at 08:40
3 answers
March 19th 20 at 08:42
speed rather from the complexity of the selectors depends on
see table "performance Measurement" here for example
https://www.scorp13.com/workflow/skorost-css-selek...

it can be an example, where "querySelector fails to find the element"? somehow never saw this :)
March 19th 20 at 08:44
Like the fastest of the DOM id to pull out. For me duck is the fastest way.
March 19th 20 at 08:46
Load all the data immediately when the page loads, and then substitute as soon as the cursor will cross the region.
What does that mean? - Clark.Cruickshank commented on March 19th 20 at 08:49
@Clark.Cruickshank, preloading content using the rel="preload". Article on this topic. - Marlon.Mitchell commented on March 19th 20 at 08:52

Find more questions by tags HTMLJavaScript