←back to thread

253 points mattcollins | 1 comments | | HN request time: 0.204s | source
Show context
henning[dead post] ◴[] No.42188297[source]
[flagged]
PaulRobinson ◴[] No.42188388[source]
Can you actually give an example?

I believe in mechanical empathy. I think developers should - win performance is a concern - think about how their code ends up on the CPU, what ends up on the heap, how caches are used, and so on.

But for most Python developers, and Ruby developers, it's more important, in more use cases, to have clear and readable code that is easily maintainable.

I've met Sandi, I've gone through her Ruby books, I recommend her teaching and her books to others. I don't see the problem.

If you need ASM, use ASM. If you're on a team doing OOP, maybe learn about OOP.

replies(2): >>42188462 #>>42188548 #
henning ◴[] No.42188548[source]
Look at the fastest linting/build tools/runtimes for JavaScript. They are mostly not written in JavaScript, because JavaScript is slow and no amount of hotspot profiling/optimization will fix that. This is also why Python's core data types for dictionaries and so on are not implemented in Python.

You can also look at any microbenchmark between pure Python and a native language of your choice, even one that uses GC like OCaml or Go, and unless the Python code has been written so that it spends all its time calling C code the way you sometimes can with regex-heavy code, Python will generally lose by a varying margin. These micro inefficiencies multiply at every level hundreds of times over to create needlessly slow, inefficient applications.

The truth is I can link benchmarks, case studies of app rewrites from Ruby to Go or something comparable, measurements about the results of using NIFs in Erlang/Elixir, etc. all day long but you'll ignore all of them.

replies(1): >>42190977 #
1. InitialBP ◴[] No.42190977[source]
A lot of time (most?) writing software isn't about writing software for the pleasure of doing so, but for building something that helps generate revenue.

For businesses, having a highly optimized web application that takes a long time to develop and doesn't allow for quick additions of new features is not worth the cost. Instead, they can have a poorly optimized web application with way more features and a faster feature production because Python/Ruby/Javascript are more approachable than other native languages.