Sometimes the old, legacy option is faster than the new one you’re supposed to use. That happens to be the case with XML in Flash: XMLDocument
is quicker than XML
. Today’s article tests its performance to figure out just how much faster it is and if it can keep up with plain Object
and typed class
instances.
Posts Tagged e4x
If you deal with XML documents, you probably appreciate AS3’s support for the E4X operators. These make it really easy to access the XML
class like any old object with the .x
(dot) operator as well as XML-specific operators like ..x
for descendants and @x
for attributes. Even fancier, there’s support for arbitrary expressions like .(@id == "123")
. With all this convenience we should wonder- how slow are the E4X expressions?
We know that the XML E4X operators are an 10x slower than plain Object
, but how slow are they compared to the XML
class’ methods like elements()
and attributes
? Today’s article finds that out.