Subject: | support for XSLoader |
Please add support for XSLoader. XSLoader is nitceably faster than DynaLoader.
With DynaLoader:
perl -MMIME::Base64 -e1 0,13s user 0,01s system 94% cpu 0,147 total
perl -MMIME::Base64 -e1 0,13s user 0,01s system 93% cpu 0,149 total
perl -MMIME::Base64 -e1 0,14s user 0,00s system 94% cpu 0,149 total
With XSLoader:
perl -MMIME::Base64 -e1 0,10s user 0,00s system 95% cpu 0,105 total
perl -MMIME::Base64 -e1 0,08s user 0,02s system 98% cpu 0,102 total
perl -MMIME::Base64 -e1 0,08s user 0,02s system 96% cpu 0,103 total
--- /usr/lib/perl5/i386-linux/MIME/Base64.pm- 2004-10-19 22:31:07 +0400
+++ /usr/lib/perl5/i386-linux/MIME/Base64.pm 2005-06-26 06:02:00 +0400
@@ -6,13 +6,20 @@
use vars qw(@ISA @EXPORT $VERSION);
require Exporter;
-require DynaLoader;
-@ISA = qw(Exporter DynaLoader);
+@ISA = qw(Exporter);
@EXPORT = qw(encode_base64 decode_base64);
$VERSION = '3.05';
-MIME::Base64->bootstrap($VERSION);
+eval {
+ require XSLoader;
+ XSLoader::load('MIME::Base64', $VERSION);
+ 1;
+} or do {
+ require DynaLoader;
+ local @ISA = qw(DynaLoader);
+ MIME::Base64->bootstrap($VERSION);
+};
*encode = \&encode_base64;
*decode = \&decode_base64;
End of patch
--
Alexey Tourbin
ALT Linux Team