Is something covering another element?

Is there a way to check if there exist any absolutely positioned elements on the page that are covering an important element? I know the easiest way is to just scrape the entire DOM and check if its z-index is higher and if it’s position and dimensions are just right for blocking the important element. But isn’t that an extremely slow algorithm?