Hello, XSLoader is noticeably faster than DynaLoader.
With DynaLoader: perl -MSys::Syslog -e1 0,26s user 0,02s system 96% cpu 0,289 total perl -MSys::Syslog -e1 0,28s user 0,00s system 96% cpu 0,292 total perl -MSys::Syslog -e1 0,28s user 0,00s system 96% cpu 0,291 total With XSLoader: perl -MSys::Syslog -e1 0,22s user 0,02s system 98% cpu 0,243 total perl -MSys::Syslog -e1 0,24s user 0,00s system 96% cpu 0,249 total perl -MSys::Syslog -e1 0,24s user 0,00s system 97% cpu 0,246 total --- perl-5.9.3.24982/ext/Sys/Syslog/Syslog.pm- 2005-04-21 00:04:44 +0000 +++ perl-5.9.3.24982/ext/Sys/Syslog/Syslog.pm 2005-06-26 04:18:56 +0000 @@ -1,11 +1,10 @@ package Sys::Syslog; require 5.006; require Exporter; -require DynaLoader; use Carp; use strict; -our @ISA = qw(Exporter DynaLoader); +our @ISA = qw(Exporter); our @EXPORT = qw(openlog closelog setlogmask syslog); our @EXPORT_OK = qw(setlogsock); our $VERSION = '0.06'; @@ -175,7 +174,8 @@ sub AUTOLOAD { goto &$AUTOLOAD; } -bootstrap Sys::Syslog $VERSION; +require XSLoader; +XSLoader::load('Sys::Syslog', $VERSION); our $maskpri = &LOG_UPTO(&LOG_DEBUG); End of patch
pgpoeC3PnLIlw.pgp
Description: PGP signature