5 ms·
Do you have the opposite experience? A language used by FAANG that doesn’t have performance issues at their scale. They seem to invest a lot in JavaScript which
by wil421 5y ago
Do you have the opposite experience? A language used by FAANG that doesn’t have performance issues at their scale. They seem to invest a lot in JavaScript which is not what I’d call a performant language and as you’ve said Python.
I’ve used Python for more scripting type tasks and creating basic APIs to get specific jobs done. I’m very weary to go “all in” on Python for an app based on all the feedback about performance.
All that being said I’ve never heard someone say we used X language and it scaled remarkably without issues. I’ve noticed lots of companies eventually go to Java once they get big but nobody really likes to brag about Java apps.
- ctur 5y agoEverything has performance issues but Python is at least one, if not two, orders of magnitude off of compiled languages like C++, Rust, and Go (despite Go having a garbage collector). They have various usability tradeoffs but once you get things working, at least you're not spending 10x as many cycles to do the same work as another language would need. (Java probably is also fine; I've less personal experience there so I can't say).
- pyentropy 5y ago> They seem to invest a lot in JavaScript which is not what I’d call a performant language JavaScript (V8 at least) is extremely performant, near native code performance. Considering how dynamic it is, it's not an easy feat but Google, Apple and Mozilla work a lot on it. Here's a benchmark where JS is 50x faster than Python: https://github.com/kostya/benchmarks https://github.com/kostya/benchmarks Note that PyPy does much better.
- imachine1980_ 5y agopypy in general works better, sometimes equal, sometime slower, and sometimes doesn't(library support is not 100%). the problem whit javascript is mainly no type check in compile time making lot more mistakes if you use a compile langues, that why a lot of big project now days use typescript, and force to use types
- igouy 5y agoAnd some where JS is not 50x faster than Python: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- Mikeb85 5y agoDid you look at the source of the programs where Python was competitive? Python basically using C types and GMP to write C in Python...
- igouy 5y ago> Did you look at the source of the programs… Did you? :-) That Node pidigits program also uses GMP. Besides those 2, did you notice other JS programs not 50x faster than the corresponding Python programs ?
- Mikeb85 5y agoI never made the assertion JS is 50x faster... But everyone knows it is significantly faster than Python. Probably at least a few times for pure JS vs. pure Python programs. Not that it matters, Python is basically glue to run mostly C and C++ programs.
- igouy 5y agoGiven that you say "basically glue" why the previous surprise about "basically using C types and GMP" ?
- munificent 5y ago> They seem to invest a lot in JavaScript which is not what I’d call a performant language A lot of them have huge amounts of code that runs in browsers, so they essentially have to invest in JS whether they like it or not. > All that being said I’ve never heard someone say we used X language and it scaled remarkably without issues. Sometimes you have to go by what people don't say. Humans tend to talk most about problems or surprises. The former are actionable and the latter are more interesting to talk about because of their rarity. That means when things work well as expected, you get silence. I remember when people constantly talked about how Java was too slow. Then there was a period of time where people talked a lot about how Java was fast enough because that was an interesting change. Now people don't talk about Java performance much at all, which is a good sign (but easy to overlook), that Java performance is now consistently reliably good for most users.