$backend = 'XML::SAX::ExpatXS'; my $xml_x_s_exs; { local $ENV{XML_SIMPLE_PREFERRED_PARSER} = $backend; $start = time(); $xml_x_s_exs = $xs->XMLin($XMLFile); $end = time(); } print_result($backend, $end, $start, $size); ... is_deeply($xml_default, $xml_x_s_exs); #### [le6303@itdevtst perl]$ ./xml.pl bigxml.xml File bigxml.xml is 1730463 bytes XML::Simple with default backend took 12.7477 seconds. This equates to 135747.5992 kilobytes per second (1024 bytes per k) XML::Simple with XML::Parser backend took 3.5870 seconds. This equates to 482431.8874 kilobytes per second (1024 bytes per k) XML::Simple with XML::SAX::Expat backend took 13.7021 seconds. This equates to 126292.1408 kilobytes per second (1024 bytes per k) XML::Simple with XML::SAX::ExpatXS backend took 5.9447 seconds. This equates to 291093.0139 kilobytes per second (1024 bytes per k) XML::Simple with XML::LibXML::SAX backend took 6.5013 seconds. This equates to 266172.9123 kilobytes per second (1024 bytes per k) ok 1 ok 2 ok 3 ok 4 1..4