Skip to content

Instantly share code, notes, and snippets.

@proycon
Last active October 2, 2019 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save proycon/a8007f9d737c1f32ac3a72a3c4f53eb0 to your computer and use it in GitHub Desktop.
Save proycon/a8007f9d737c1f32ac3a72a3c4f53eb0 to your computer and use it in GitHub Desktop.
FoLiA benchmark

FoLiA implementation benchmarks

Tested on a Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz, Linux 5.3

Note: The folia-rust implementation does only a minimal validation whereas the others do a a complete shallow validation on parsing, including also a text consistency validation.

Benchmarks on a +-100MB FoLiA document

file: bosb002gide03_01.nederlab.folia.xml

Parse from file into a full memory representation (DOM)

Implementation CPU Memory Peak Memory
foliapy v2.2.1 60.9 s 2083 MB -
libfolia v2.3 14.7 s 2656 MB 2681 MB
folia-rust v0.0.1 2.6 s 531 MB 622 MB

Selecting and iterating over all words

Implementation CPU Memory Peak Memory
foliapy v2.2.1 1.46 s - -
libfolia v2.3 0.84 s - -
folia-rust v0.0.1 0.122 s - -

Serialisation (without disk writing)

Implementation CPU Memory Peak Memory
foliapy v2.2.1 77.7 s - -
libfolia v2.3 5.06s - -
folia-rust v0.0.1 1.14s - -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment