Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Perl Module written in C/asm

by QuillMeantTen (Friar)
on Nov 19, 2015 at 18:06 UTC ( [id://1148136]=perlquestion: print w/replies, xml ) Need Help??

QuillMeantTen has asked for the wisdom of the Perl Monks concerning the following question:

Greetings, fellow monks

After a recent discussion (it was not heated enough to be a full blown flamethrower free-for-all) with some of my comrades on the topic of performance versus (ease of use|development time) I began to wonder about the way one could write part of (or all) a perl module in C.

The reason behind it is the following : after some work on that C assignment of mine I became aware that I completely overlooked some development aspects in my prototype : the profiling.
Then, as I grudgingly tread on that path on the final version of the project I started daydreaming a bit about how such a project would make more sense written in Perl (I already thought that when I wrote the Perl prototype). Then the discussion I started by talking about came back to my mind and I thought that it would be very nice to be able to rewrite in C/asm the parts singled out by the profiler.

So, on I went, collecting pdf printouts of perlxs, perlxstut, h2xs, perlguts and perlapi. As I read through the material I wonder, has anyone here done it and would be willing to share about h(is|er) experience? Were the rewards (at list the quantifiable ones) enough to justify the hassle of going low level? Thank you for your input

Replies are listed 'Best First'.
Re: Perl Module written in C/asm
by ctilmes (Vicar) on Nov 19, 2015 at 18:17 UTC
      ctilmes has given you excellent advice. I would add that "when you have to" is usually much more of an economic issue than a technical one. (e.g. Will the improved performance, over the expected life of the program, pay for the added development cost?)
      Bill

      Thank you very much for that advice, this module is extremely interesting, I will use it henceforth!

Re: Perl Module written in C/asm
by BrowserUk (Patriarch) on Nov 19, 2015 at 22:03 UTC

    Check out Inline::C


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1148136]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-28 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found