Perl inline function

H

howa

are there inline function or macro for Perl, so function's performance
can be optimized for speed?

thanks.
 
M

Mirco Wahab

howa said:
are there inline function or macro for Perl, so function's performance
can be optimized for speed?

Yes, there are now three approaches,
1) XSUB/XS, an interface between Perl and C modules
2) Inline C, like above, but "really inline"
3) PDL (Perl Data Language)

Please try some examples which are freely available,
like these:

http://perldoc.perl.org/perlxs.html
http://search.cpan.org/~ingy/Inline-0.44/Inline.pod
http://pdl.sourceforge.net/PDLdocs/API.html

Regards

Mirco
 
U

Uri Guttman

h> are there inline function or macro for Perl, so function's performance
h> can be optimized for speed?

if sub calling overhead is a real problem then you should not code in
perl. this is likely a case of premature optimization. you will likely
get much better preformance by choosing a better algorithm, data
structure or design. but without code or a reason for this speedup
request there is no way to assist you.

uri
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top