Results 1 to 4 of 4

Thread: should i learn node js

  1. #1
    Join Date
    Mar 2012
    Beans
    49

    should i learn node js

    why some people advise not to you use node js for some specific tasks like calculating fibonacci serie?

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    21,690
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: should i learn node js

    Because compiled C is so much faster, it isn't even funny. Almost any compiled language wold be faster.

    Javascript is scripted and slow. NodeJS is great for lightly used sites, say 1-2 thousand concurrent connections. For tens of thousands of concurrent connections, languages that scale better are available.

    There are lots and lots of good reasons to use NodeJS and places where it makes really good sense. Doing heavy math just isn't the best use for javascript.

    As always, the best tool for the job should be used.

  3. #3
    Join Date
    Mar 2012
    Beans
    49

    Re: should i learn node js

    is python compiled available for this matter on the server side?

    i ask because i've only seen hosting provider offering interpreted python

    i've read that in some python compilations are faster than compiled c

    is that true?

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    21,690
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: should i learn node js

    Any language can product slow code. If you are a bad C programmer, then you can make terrible code. The same applies to python, javascript, perl, Rexx, C#, C++, Rust, ruby, or the other 500+ other languages.

    The only way to know for sure that any implementation of a program is faster or slower than any other would be to create both, using experts for each language, then use a profiler to time the runtimes. If the program runs once a month for 2 minutes in python and the C version runs in 1 minute, how useful is that? OTOH, if the program runs 50,000x a day, spending the time to get the C version down to :54 seconds would be very worth while. I doubt the python version could be made faster by an expert, considering that python is implemented in C. But a crappy C programmer's code vs an expert Python programmer would likely be more on par for performance.

    In short, the answer is "it depends."

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •