M4 parse lines - markov2/perl5-Mail-Box GitHub Wiki

In-memory parser

Initial timings

Each average of 10 runs on a random 62MB mailbox with 4122 messages.

                                    User       System
Mail-Box release 3.011 from file    9.846s     0.172s
Mail-Box 3.012 to be from file      9.531s     0.167s   3.3% faster
Separate messages in-memory 3.011  11.496s     0.007s
Separate msgs in-mem 3.012 to be   11.088s     0.010s   3.7% faster
Separate msgs in-mem 3.012 ref str 11.192s     0.008s   2.7% faster

In this (old) case, the in-memory messages are parsed via the pseudo-file interface offered by Mail::Box::FastScalar. Not included in the last three numbers is the 0.488 seconds to read the mailbox file, and split it in separate messages.