2 ms·
The other thing is that most programs are probably doing nothing most of the time. Waiting for user input, waiting for network IO, waiting for some other real-w
by sdflhasjd 6y ago
The other thing is that most programs are probably doing nothing most of the time. Waiting for user input, waiting for network IO, waiting for some other real-world event.
For most developers, it's probably not using another language so you can "wait faster" most of the time. The performance sensitive code can be scrutinised and properly optimised on a case-by-case basis.
- PaulHoule 6y agoReally the "reason why computers suck in 2021" is that user-interfaces are fundamentally single threaded, and that every time you see a spinning circle or beach ball on your computer, some application dropped the ball and none of the UI will render ever again until some function returns. Maybe that function is waiting for a signal from Mars or a DNS lookup, or a 3GB file download, or for an O(N^2) algorithm to finish (e.g. does your "no code" tool know when to say "no"?,) but it hangs up everything else. Web browsers are huge programs written in C++ by the greatest software development organizations and they block the render thread as little as possible, Javascript inherits this property as embedded in the browser and that is why it is so dominant on the front end. Perhaps some more radical idea like breaking the application up into tasks that are killed in (say) 50ms and can be individually crashed (like Erlang) but going from that idea to conception is a lot of work -- one thing to do for a very simple mobile app, another to do write a framework you could write an IDE like VS Code in. And that is what I find so irksome about the hand-wringing behind "Why isn't language X so popular?" is that if you really want to be doing something harder than what most people are doing you will need to thread a path from beginning to end and you're going to do that first through mastery of computer science (general) and second doing it through mastering your tools (specific). There is so much path-dependence everywhere. I have gotten into the Arduino hobby lately. A 1970s computer scientist would think it was insane that it uses C instead of something more like Pascal or PL/I, that it should have a language that respects the Harvard architecture, etc. They'd be right. C's a terrible language to use for that purpose, except that (1) the developers of Arduino could get a good C compiler and toolset off the shelf, (2) many people know how to program C, (3) you aren't wasting your time learning C, and (4) C isn't that bad, and (5) you can't write that big of a program for an Arduino anyway so you can only get into so much trouble with a "buffer overflows included" language.