[Ilugc] .a-tip-a-day (patch - apply diffs and act as inverse of diff)

  • From: steve@xxxxxxxxxxxx (steve)
  • Date: Wed Sep 30 20:43:40 2009


On 09/30/2009 06:52 PM, Prem Kurian Philip wrote:

From: steve<steve@xxxxxxxxxxxx>

If you *really* want to go that way and do a 'relevant' one-to-one
comparison, you have to include the number of syscalls being made by
gcc>>when compiling your code to binary ...which is essentially what
the perl>>interpreter is doing for  you for 'free'.

 the C programs does the same job with 23 system calls
*plus* the number of syscalls it would take for gcc to convert text to
executable code, which is what perl does on your behalf. So, comparing
number of syscalls of the final executable is not a valid measure of
appropriateness of a langauage.

How do you think the python/perl/whatever-interpreted-language works? The
interpreter first reads in the script, parses the code, checks for errors,
compiles it down to byte-code etc and then starts executing the statements
line by line. How is this "free"?


Ok now, this is getting creepy. Why do people insist on taking my words out 
context, latching onto them and then sending out a reply ? Is there something 
happening here that I am not aware about ?

What did 'free' mean in my statement ? I'll tell you what -- a bad choice for a 
word. I thought my statement world imply

    "...unlike the aforementioned required step of invoking gcc, the perl 
interpreter would generate machine code from text, on your behalf, without 
expecting any additional effort on your part" (hence /for free/)

...but obviously, this meaning did not translate. What instead it /did/ 
translate to was that due to some strange, weird, unimaginable reason, I am 
talking and defending things that I lack the basic understanding about, like, 
for instance, how an interpreter works !!

So, i apologize for my poor choice of words.

A compiler is required to create the machine code just once - while an
interpreter will need to do this every time a script is done - unless you
are using pre-compilation.

Ultimately, yes, it does come down to the number of instructions which are
executed by a platform for performing a single function. No one in their
right mind will argue that a program written in C wouldn't be faster than
the equivalent program written in any other high level language - unless
the algorithm was implemented poorly.

And yes, the platform you use to run your app on has a pretty drastic
impact on cost - the cost of software, the servers, electricity etc all
add up if you are going to be adding servers.


again, my sole intent was to show the fallacy of an assertion, to balance the 
scale of measurement, to point out the error in comparison, to bring some sense 
of perspective ...to bring some /sense/ itself, for that matter ! ...*not* to 
defend one language over the other.

Again, I guess, I didn't do too well. Ah well ! I'll leave you boys to your 
language war.

cheers,
- steve

-- 
random non tech spiel: http://lonetwin.blogspot.com/
tech randomness: http://lonehacks.blogspot.com/
what i'm stumbling into: http://lonetwin.stumbleupon.com/

Other related posts: