|
|
Darren New <dne### [at] sanrrcom> wrote:
> http://freeshells.ch/~revence/simple.txt
He says that if you need to use arrays, the language is wrong.
That would make haskell wrong, because it supports arrays. (The question
would be: *Why* does it support arrays if, according to him, arrays are
completely unnecessary?)
He also refers to this:
http://freeshells.ch/~revence/no-c.txt
He is quite wrong at many places:
He says that if everything you care about is speed, then you should use
assembly. This is completely wrong. 99.999% of programmers cannot beat a
good C compiler in speed by writing assembly directly. It's way too
complicated (especially with today's processor architectures with all their
multiple pipelines and whatnot).
Even if you knew how to beat the C compiler by writing assembly directly,
you would be writing for *one* processor architecture only. Your code will
most probably become slower then the C version quite soon, probably in one
or two new processor versions.
By writing in C you are making fast code for *all* possible processor
architectures which have a decent C compiler. This is simply *impossible*
to do by writing assembly (one reason being that you simply cannot predict
the future and know how processors will develop).
So the answer is no: You cannot beat a C compiler by writing assembly.
Even if you beat it *now*, you will lose in the near future.
"If it's speed you want, use macros, not functions." This guy must have
smoked something really bad.
He also says that optimizing memory usage is complete nonsense. Clearly
he has never made programs which require handling humongous amounts of
data very fast. If he ever has to, and he is running out of memory, he
will have to start hand-optimizing with his beloved haskell using its
ugly byte arrays.
--
- Warp
Post a reply to this message
|
|