dom/element/attributes: make the best case faster