Benchmarks.md

April 15, 2014 ยท View on GitHub

Benchmarks

Below is a comparison between the default Python MIME parser and flanker.mime in Time, Memory, and Function calls as well as other benchmarks relating to Flanker performance.

Test Specification:

  • 2x Intel Core i7-3520M CPU @ 2.90GHz
  • 2 GB RAM
  • Results were averaged over 50 runs

Time

Full Message:

File Sizeemail.parser (seconds)flanker.mime (seconds)Speedup
11 MB0.6010.0738x
1.8 MB0.1130.01110x
16 KB0.0010.0030.33x

Headers Only:

File Sizeemail.parser (seconds)flanker.mime (seconds)Speedup
11 MB0.6010.02920x
1.8 MB0.1130.00912x
16 KB0.0010.0020.5x

Peak Memory Usage (including interpreter)

Full Message:

File Sizeemail.parser (MB)flanker.mime (MB)Memory Difference
11 MB59.5146.270.77x
1.8 MB30.5528.520.93x
16 KB28.4528.510x

Headers Only:

File Sizeemail.parser (MB)flanker.mime (MB)Memory Difference
11 MB59.5128.070.47x
1.8 MB30.5528.520.93x
16 KB28.4528.520x

Function Calls

Full Message:

File Sizeemail.parser (#)flanker.mime (#)Speedup
11 MB914,7412,011454x
1.8 MB195,06211,04617x
16 KB3,2163,5842-1.1x

Headers Only:

File Sizeemail.parser (#)flanker.mime (#)Speedup
11 MB914,7411,253730x
1.8 MB195,0629,74120x
16 KB3,2162,4761.2x

Pinned Regex

Even though master does not use a pinned version of regex, we strongly recommend due to the 6x speedup compared to the latest version on PyPi (as of 4/15/14). It may not be an issue for someone that handles many small files, but is an issue for large files.

File Sizeregex.1.20110315 (seconds)regex 2014.04.10 (seconds)Speedup
11 MB0.07200.46526x