Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Slow code is usually written due to ignorance rather than choice. Lots of people only know OOP, which is slow and unoptimisable by default.


sort by: page size:

C++ is slow as well.

It might not be slow in general, but it's easy to write slow code in it.

I don't think we can really blame slow languages.

Implementations of languages like javascript, ruby - and I would presume python and php - are a lot faster than they used to be.

I think most slowness is architectural.


Oop is slower than functional in many cases. The highly optimized java stack isn’t that fast and still uses oodles of memory. And then there’s languages like ruby which are practically slower than writing shell scripts.

There really is not much you can do to a language to make you code faster. I guess people just like the novelty of a new language.

I have to disagree with a few of these, especially #3. Slow code isn't necessarily bad code. In fact, speeding it up may turn it into bad code.

This is a good example of why I roll my eyes at most programming language discussions. There is always someone that starts the "language X is SLOW" bandwagon, and people hop on.

Languages are rarely "slow" or "fast" by themselves. Programs written in those languages can be slow or fast.


If your goal is to launch, stop fooling around with languages and rewriting your code. What exactly was slow?

I used to program in Visual BASIC 6.0 which was considered slow at the time. It is just a matter of using the proper algorithms to speed it up. Almost any programming language targeted at beginners or newbies is going to be considered slow because beginners and newbies don't know the proper algorithms and code tweeks to speed things up yet.

When you deal with sloppy inefficient code, almost any language is going to be considered slow.

I remember trying to make a paint program with Turbo Pascal 3.0 back in the DOS days, it was slow until I learned better algorithms in drawing things and how to write directly to video memory instead of using built in commands like plot.


If you tell me a programmer wrote a thing in a month, and another programmer wrote a similar thing in a year, I'd assume the 1 month project is easier to understand and work with.

Fast programmers writes most shitty code, yes, but that is because fast programmers writes most code period. I have seen nothing to suggest that an average slow programmer actually produces quality code when given the time, it seems to be the opposite, most slow programmers have terrible mental models and create even bigger messes if you give them the time to do it.

Are there slow programmers who produce quality code? Yes, but in my experience those are the exception and are even rarer than fast programmers who produce quality code.


Some people don't care that it's slow. Availability and uniformity is much more valuable for example in school environment, especially at one where they teach IT one hour per week and the teacher is not really a programmer themselves.

Nothing trips up beginners like slow code.

I'm saying languages with a Runtime and everything-is-a-(nullable)-reference dont have this issue of programmers being able to write super awful code. There is a clear limit to how slow simple looking code can be in C# or java, whereas languages like C++ (which I have a few years experience in) definitely allow you to write the worlds slowest code without the code looking like it.

Maybe you expected me to have a combative point due to my introduction, but i dont - im just pointing out that people use languages like Rust and C++ thinking they are fast, when really, an inexperienced programmer in either will write slower code than an inexperienced programmer in a lot of other languages.

They feel they dont need benchmarks, because their language is "fast".


When someone understands what is happening when their program executes they will write faster programs without much more effort.

You might like writing slow programs, but that doesn't mean people like using them.


Some people just aren't very good coders. No language will make their programs run faster. What will are books like effective c++, effective java and refactoring.

The fastest language only makes sense when the code is written by an expert.


Typically a language is considered slow or fast based on it's most popular implementation, sadly.

C++ actually used to be pretty slow back in the day, but that's more the fault of compilers that didn't optimize properly. That was about 15 years ago. (In other words, this guy missed the "C++ is slow!" bandwagon by a decade and a half.)

It’s easy to write slow code in any language. I wrote some slow Fortran before I learned how not to. Generally you need to know a good amount about not only the language, but about the machine you’re targeting, to write really efficient code.

I'm guessing, just guessing, that most of the people who don't think slow execution is bad are probably not that interested in what the machine actually has to do to execute their code, and hence, are not actually well educated in making those tradeoffs.
next

Legal | privacy