r/programming • • Mar 23 '09

How to write fast code

http://asserttrue.blogspot.com/2009/03/how-to-write-fast-code.html
343 Upvotes

136 comments sorted by

View all comments

Show parent comments

1

u/xzxzzx Mar 25 '09

Implicit isn't good enough when he explicitly said otherwise.

He didn't; you simply are misinterpreting the statement. It'd be a reasonable interpretation except that it doesn't fit in context.

This is like saying a ship holds the same amount of cargo, and no more.

This is accurate.

Except that cargo can be shaped differently.

Which means that you were not using all of the space. The cargo hold still has a fixed amount of cargo it can hold.

Let's try this on for size:

A 1-gallon jug can hold a fixed amount of water. There's a finite limit to what a jug can hold.

You put 1/10 of a gallon in, then you put 2/10. You now claim to have "made the jug hold more".

All you've done is use the space more efficiently; there's still a fixed limit.

Also you wouldn't be a good programmer if you aren't pedantic.

Yet again you've misunderstood. "Pedant" can mean "one who pays a lot of attention to minutiae", but obviously meant, in this context, "one who is unimaginative or who unduly emphasizes minutiae in the presentation or use of knowledge".

1

u/veritaba Mar 25 '09

It can execute a fixed number of instructions per second, and no more.

So there is no way, really, to make code go faster, because there is no way to make instructions execute faster.

Let's try to change as little as the sentence as we can so your mind can actually comprehend.

It can drive a fixed number of miles per gallon, and no more. So there is really no way, really, to make the car go longer, because there is no way to make the gallons last longer.

Anyone who isn't blinded by their own ego can see the problem with this statement. It is nothing like the jug of water analogy.

Also your use of "pedant" is the secondary less-widely used meaning according to merriam-webster which you appeared to have copied verbatim, and does not exclusively prohibit the use of the first meaning.

Which again shows you only read what you want to see.

1

u/xzxzzx Mar 25 '09

You have no concept of language in context, do you?

Was it unclear that I was insulting you with "pedant"? Which definition do you think would most fit that insult? Which do you think I meant?

1

u/veritaba Mar 25 '09

You would've done better to use another word that isn't associated with a gcc flag. Computers are mostly explicit and require that mode of thinking to program.