XmlElement and Identifier

Is there any reason why many methods of XmlElement take a StringRef rather than an Identifier?

we have XmlElement::setAttribute (const Identifier& attributeName, ...)

but

XmlElement::hasAttribute (StringRef attributeName)
XmlElement::getStringAttribute (StringRef attributeName)
XmlElement::getIntAttribute (StringRef attributeName, int defaultReturnValue = 0)

etc.

Well, in real-world use, I found that almost all the places where you call those functions, you tend to just pass it a string literal. Identifiers are fast to compare, but have a lot of overhead when you create one, so the overhead of converting a string literal just to pass it into those functions outweighed the speed of using it. A StringRef means either a literal or an Identifier, or a String will all go straight in without any allocations needed, and it works out faster overall.