Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How efficient is javascript? [closed]

Sometimes I hear the argument against doing things on client side using javascript. People say stuff like "JavaScript is inefficient...or slow". I'm wondering if there actual facts supporting this conclusion?

like image 271
dev.e.loper Avatar asked May 11 '09 14:05

dev.e.loper


2 Answers

There are really two factors to Javascript performance:

  1. Your code
  2. The scripting engine running your code

Your code is the easiest factor to fix. As you develop, optimize your code as best you can. Easy.

The second isn't always as easy. I've had some applications where performance on one browser was excellent and another was slower than mud. Others run great across the board. Best you can do is test, test, test, and test again. If you want a good article, check out the link:

Coding Horror: The Great Browser JavaScript Showdown

like image 137
Justin Niessner Avatar answered Oct 15 '22 11:10

Justin Niessner


That depends alot on the browser's javascript engine.

Over all, it's a scripting language, so it won't do as well as C++ or another compiled language. However, it's good at what it was intended for, and that's drive web pages.

like image 39
Zack Marrapese Avatar answered Oct 15 '22 09:10

Zack Marrapese