Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which is a faster parser for XML? [closed]

I am trying to parse a simple file, and I want to know between:

  • XML::Simple
  • XML::Smart
  • LibXML

which one is faster?

like image 731
user2583714 Avatar asked Jul 15 '13 13:07

user2583714


2 Answers

XML::LibXML is the fastest, see the benchmarks at Ways to Rome.

It may or may not matter for a "simple file" (which I assume would mean that it's not too big).

like image 142
mirod Avatar answered Oct 10 '22 21:10

mirod


There's also XML::Fast which seems to be a pretty serious contender. XML::Simple can use XML::LibXML under the hood, but I'm still seeing it as the major CPU drain in my CalDAV testing right now.

It's worth giving it a try if speed is a major consideration for you.

like image 33
Bron Gondwana Avatar answered Oct 10 '22 21:10

Bron Gondwana