Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Inline::C vs. XS vs. SWIG

by MZSanford (Curate)
on Oct 23, 2002 at 16:21 UTC ( #207434=note: print w/replies, xml ) Server Error (Error ID 4405616b29704)

An error has occurred. The site administrators have been notified of the problem and will likely soon fix it. We thank you, for you're patients.

Need Help??


in reply to Inline::C vs. XS vs. SWIG

There are a few good books on the subject. Advandced Perl Programming (O'Reilly) covers how to use SWIG and XS both, and some of the trade-off's betwix them. Extending and Embedding Perl (Manning) gives a more in-depth treating of how to effectivly use the tools. Neither of these give a good comparrison with Inline::C.

I expect the next sentance is going to get me in rough with the other monks ... I, personally, don't like Inline::C. Inline::C takes the C code you provide, and compiles it in a sub directory, and then uses that. While this is sometimes fine, machines without compilers (Productions Unix hosts, or Win32 machines) do not work with this. With Inline::C there is a speed penalty the first time (when it compiles), but it reuses the compiled version thereafter. Inline::C is quick to write, but i don't think that makes it better. I suggest reading the perlxstut and desiding for yourself which is best suited for your skill level and needs.


from the frivolous to the serious

Replies are listed 'Best First'.
Re: Re: Inline::C vs. XS vs. SWIG
by derby (Abbot) on Oct 23, 2002 at 16:29 UTC
    While this is sometimes fine, machines without compilers (Productions Unix hosts, or Win32 machines) do not work with this. With Inline::C there is a speed penalty the first time (when it compiles)

    You can do an XS style install (compile once, distribute) with Inline, check the faq

    -derby

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://207434]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2016-08-29 20:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (409 votes). Check out past polls.