Well, for one thing, make sure you're writing the smaller file out immediately before reading it back in if you want to make sure your testing is accurate. There's a good chance your OS is buffering the write and reading the file back in from the buffer in the case of good.txt so make sure it does the same for bad.txt too.
If you still have issues with time, you may want to look at the C source for Base64.so (or whatever the shared library is called on your platform). MIME::QuotedPrint is a wrapper around MIME::Base64 and that is a wrapper for XS code.
Do you have any whitespace at the ends of lines in bad.txt (which is not the case, clearly, in good.txt)? According to RFC 2045, section 6.7, rule 3 any whitespace at the end of a line, including space and tab, must be encoded if no printable characters follow them (except that a soft line break counts as printable since it's visible in the encoded version). Those extra conversions could be exercising a hot spot in the code of Base64.so which is causing a slowdown.
In reply to Re: MIME::QuotedPrint poor performance
by mr_mischief
in thread MIME::QuotedPrint poor performance
by RenalPete
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |