Just curious: perl + C + asm, any?

M

Michele Dondi

As of the subject, I was wondering if anyone has ever written a binary
module for perl that in turn had some routines written in assembler,
for efficiency reasons.


Michele
 
I

Ilya Zakharevich

[A complimentary Cc of this posting was sent to
Michele Dondi
As of the subject, I was wondering if anyone has ever written a binary
module for perl that in turn had some routines written in assembler,
for efficiency reasons.

Why not? Take a module which uses an externally available C code
which uses ASM (such as Math::pari). This is a beast to compile,
though, since Perl's Config.pm does not know how to run assembler...

Or, less strict, take any Perl module which links with a library which
is compiled from assembler code (such as Math::GMP).

Hope this helps,
Ilya
 
P

Penguinista

Ilya said:
[A complimentary Cc of this posting was sent to
Michele Dondi
As of the subject, I was wondering if anyone has ever written a binary
module for perl that in turn had some routines written in assembler,
for efficiency reasons.


Why not? Take a module which uses an externally available C code
which uses ASM (such as Math::pari). This is a beast to compile,
though, since Perl's Config.pm does not know how to run assembler...

Or, less strict, take any Perl module which links with a library which
is compiled from assembler code (such as Math::GMP).

Hope this helps,
Ilya

The efficiency margin of assembly over well written C is usually very
small, and comes at the cost of portability. Unless the algorithm is
written to utilize architecture specific features it's probably not
worth the trouble.
 
M

Michele Dondi

Why not? Take a module which uses an externally available C code
which uses ASM (such as Math::pari). This is a beast to compile,
though, since Perl's Config.pm does not know how to run assembler...

Or, less strict, take any Perl module which links with a library which
is compiled from assembler code (such as Math::GMP).

This is exactly what I meant! Thanks, I would have thought that to
much a more rare thing though.


Michele
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top