On Tue, Jan 28, 2003 at 10:48:53PM -0000, Smylers wrote: > Joshua Hoblitt wrote: > > > > > However the POSIX module is rather large and I think it's a rather > > > > in-obvious place to look for a math function. > > > > > > I don't know; it's where I'd expect to see things which are in the > > > "standard C library" (whatever that means) but aren't directly > > > available as Perl functions. > > > > I'm only really interested in log10 - this is something that (I feel) > > really should be a core function. As I said before, POSIX is a huge > > module to load for just one common function. > > Well, pedantically, you said "rather large". Does loading POSIX slow > things down too much? I have often used it just for C<strftime> and > haven't found that a problem.
Loading POSIX itself is slow *by default* $ time perl -e 'use POSIX' real 0m0.060s user 0m0.060s sys 0m0.000s One speed (and slight size reduction) trick is to use an explicit import list $ time perl -e 'use POSIX qw(log10)' real 0m0.043s user 0m0.020s sys 0m0.020s Nicholas Clark
