this post was submitted on 21 Nov 2023
253 points (89.7% liked)

Programmer Humor

32710 readers
1359 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] merthyr1831 0 points 1 year ago (1 children)

it's cpython much slower than JS?

[โ€“] zacher_glachl 2 points 1 year ago* (last edited 1 year ago)

Modern browser javascript engines are way faster than CPython. My guess as to why: For over 10 years, one of the largest companies in the world (Google) has had a vested interest in improving the performance of the V8 javascript engine running in chrome. V8 is highly optimized for performance.

By comparison, there has never been such a concerted push to optimize pure python execution in CPython. Generally, if you need to get something done quickly in python, you just call into a library written in C or Fortran.