Skip to content

Performance is not comparable to other XML parsing libraries #126

Description

@conradev

I build and maintain a library for parsing property list files in Rust, plist-rs, and I created benchmarks to compare it to the other common plist parsing libraries:

$ rustup run nightly cargo bench --features libplist
     Running target/release/comparison-1b39fc719adbc926

running 6 tests
test foundation::bench_binary ... bench:   2,214,275 ns/iter (+/- 785,637)
test foundation::bench_xml    ... bench:   7,600,543 ns/iter (+/- 1,284,842)
test libplist::bench_binary   ... bench:   4,147,479 ns/iter (+/- 1,656,727)
test libplist::bench_xml      ... bench:  13,847,505 ns/iter (+/- 6,601,819)
test rust::bench_binary       ... bench:   2,303,294 ns/iter (+/- 1,778,663)
test rust::bench_xml          ... bench:  32,686,229 ns/iter (+/- 5,390,257)

test result: ok. 0 passed; 0 failed; 0 ignored; 6 measured

The XML property list parser in plist-rs is based on xml-rs, and as you can see it is twice as slow as libplist which uses libxml and four times as slow as NSPropertyListSerialization (Apple's implementation) which uses a custom XML parser.

Just wanted to open this as a tracking issue to investigate where the issues are.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions