Subject: | Surprising ParseDate() performance differential, DM5 vs. DM6 |
Date: | Tue, 17 Feb 2015 15:42:33 -0700 |
To: | bug-Date-Manip [...] rt.cpan.org |
From: | Glenn Golden <gdg [...] zplane.com> |
Hello,
Wondering if you'd mind having a look at the attached simple ParseDate()
benchmark script to see if you get results similar to what I'm seeing, between
DM5 and DM6. On my setups, I see a differential of roughly a factor of 3 in
favor of DM5, as evaluated on the following systems:
x686 Perl 5.20.1
x86-64 Perl 5.20.1
x86-64 Perl 5.16.3
I'm not suggesting this is a bug or even complaining about the efficiency in an
absolute sense, since the doc is clear that efficiency was not a prime design
consideration of the module; but it does seem to contradict this statement
about DM5 vs. DM6 relative performance in Date::Manip.3pm:
Performance Issues
------------------
Considerable time has been spent speeding up Date::Manip, and fairly simple
benchmarks show that version 6 is around twice as fast as version 5.
I understand that the above statement was probably meant to be applicable to
the package as a whole, i.e. over the entire set of D::M functions. But I
think that many readers could gain the impression that using DM6 is likely to
nearly always provide a speed improvement over DM5, and so perhaps might not
even attempt a comparison. But a 3x slowdown in what is probably one of the
most commonly used routines might make the difference between choosing 5 over
6 in some applications. (That was the case for me, in a script in which
ParseDate() was the primary workhorse in an inner loop.)
So I'm wondering if you'd be amenable to a doc update to the above blurb that
points out that efficiency crossovers may occur in some routines, just to bring
it to users' attention, even though DM5 is no longer in active development.
If you agree with this approach, I'd be happy to submit a doc patch.
Thanks,
Glenn
Message body is not shown because sender requested not to inline it.