Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: new DLL compile code inside script languages

by CountZero (Bishop)
on Jul 04, 2009 at 22:25 UTC ( #777276=note: print w/replies, xml ) Need Help??

in reply to new DLL compile code inside script languages

perl -e "$sum += $_ for (1 .. 100000000); print $sum;"
took about 26 seconds on my Windows XP Pro with an Intel Pentium 1.7 Ghz processor.

Fast enough for me and it took me like 10 seconds to write this code. I see no benefit to code it in PDL or call arcane functions in a DLL: that would have taken me much much longer.


A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^2: new DLL compile code inside script languages
by Jorge_de_Burgos (Beadle) on Jul 05, 2009 at 14:04 UTC
    Of course in Linux you want to change those double " to single ': perl -e '$sum += $_ for (1 .. 100000000); print $sum;'

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2023-03-21 10:34 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (60 votes). Check out past polls.