|Syntactic Confectionery Delight|
Benchmarking email address validation methodsby rob_au (Abbot)
|on Feb 02, 2004 at 11:36 UTC||Need Help??|
rob_au has asked for the
wisdom of the Perl Monks concerning the following question:
In performing code review for an internal project, a question was raised as to the better method to validate email addresses against RFC822. Two techniques from separate projects were examined and benchmarked, one which uses Email::Valid::Loose and the other, Mail::RFC822::Address, the results of which follow.
The question which I have however is as to whether this benchmark valid? Is the benchmark code accurately measuring the relative validation techniques or is this comparison in some manner flawed? I am most interested in this, as the Benchmark results received differ from what I would have expected, particularly given the size and complexity of the $Addr_spec_re regular expression from Email::Valid::Loose.
The benchmark code:
And the benchmark results:
perl -le "print unpack'N', pack'B32', '00000000000000000000001010111101'"