r/ProgrammerHumor • • Jun 24 '18

JavaScript is getting real tired of your jokes

Enable HLS to view with audio, or disable this notification

12k Upvotes

415 comments sorted by

View all comments

92

u/ClysmiC Jun 25 '18

JavaScript accusing another language of being slow 🤔

129

u/StapledBattery Jun 25 '18

Python is much slower than JavaScript in many cases.

28

u/chateau86 Jun 25 '18

Screams in PyPy

45

u/visualdescript Jun 25 '18

Mainly due to the massive investment in JavaScript engines that have occurred over the last 10+ years in the browser wars.

12

u/MadRedHatter Jun 25 '18

That, plus Python has some poor architectural decisions that make it difficult to refactor in ways that would improve performance without breaking code. The implementation details bleed into the language.

2

u/[deleted] Jun 25 '18

Ooh, sounds interesting, care to elucidate?

6

u/aetius476 Jun 27 '18

I once attended a "Performant Python in Big Data Applications" talk. The entire presentation boiled down to "call through to C/C++ functions as quickly as humanly possible."

-37

u/Ketchary Jun 25 '18

More like "in almost all cases". I can't comprehend how a scripting language could ever be faster than a compiling language, unless one of its core mechanics was atrociously implemented.

66

u/StapledBattery Jun 25 '18

They are both scripting languages...

15

u/visualdescript Jun 25 '18

What you're referring to here is an interpreted language vs a compiled language. Both python and js are interpreted languages, meaning at run time the code is run through an interpreter which compiles it to machine code.

Compiled language do that at build time, or compile time, meaning when they run they should be more efficient as there is less work to do.

This is a massive over simplification and I'm sure someone will be able to build on this or correct me where I'm wrong.

→ More replies (1)

0

u/[deleted] Jun 25 '18

[deleted] — view deleted comment

5

u/[deleted] Jun 25 '18

You really missed his point hard.

→ More replies (1)
→ More replies (1)

7

u/moland Jun 25 '18

Do you want someone to explain the python joke?

11

u/Code_star Jun 25 '18

don't get python users started explaining things ... it never stops

30

u/Luk3Master Jun 25 '18

import explanation

5

u/Code_star Jun 25 '18
 File "<stdin>", line 1, in <module>
 ModuleNotFoundError: No module named 'explanation'

2

u/10000_vegetables Aug 07 '18
pip insall explanation 

2

u/rodneon Aug 08 '18
ERROR: unknown command "insall" - maybe you meant "install"

1

u/10000_vegetables Aug 08 '18

oh god how did I not see that

1

u/awakenDeepBlue Jun 25 '18
from StackOverflow import Solutions

2

u/qqwy Jun 29 '18

Besides what other people said, slow is mostly referring to the fact that Python 2 is still depended upon in so much places, while Python 3 has been out for almost ten years now. "it takes years to count from 2 to 3"