[UPHPU] Rails vs PHP
Walt Haas
haas at xmission.com
Tue Mar 27 10:41:21 MDT 2007
On Tue, 2007-03-27 at 08:58 -0700, Joshua Simpson wrote:
>
>
> On 3/27/07, Walt Haas <haas at xmission.com> wrote:
> On Tue, 2007-03-27 at 08:01 -0700, Joshua Simpson wrote:
> > The assembly code generated by modern compilers outmatches
> nearly any
> > handwritten assembly most people can come up with. It's a
> common fallacy
> > nowadays that human generated asm is superior in speed for
> most things;
> > that used to be the case, but now that compilers have
> evolved to the point
> > where they are today, it's pointless to write in assembly
> for most
> > performance reasons.
>
> Negatory. We still have to hand-code assembler for a few very
> specific
> tasks, the kind of code that is very tightly coupled to a
> specific
> specialized chip. In fact doing that is pretty common
> practice in the
> embedded systems field (where I have spent most of my life).
>
> That's why I said for most performance reasons. Wouldn't you agree
> that assembly, on x86, is almost never used for performance gains?
No I wouldn't. In fact, almost the only reason we write assembler
language on x86 these days is because we need a performance gain. As I
mentioned, this is usually in code that is very closely tied to some
special chip in an embedded system, but in some cases assembler is the
only way to prevent an overrun or underrun in getting data between that
chip and the CPU. Given the issues, that's not a decision that's made
without considerable study.
I wrote literally tens of thousands of lines of assembler for a number
of different CPUs back before compilers were as good as they are now.
Believe me, I know the pros and cons. I don't miss writing assembler
any more than I miss punch cards :-)
I don't expect this to have much impact on the type of web site we
normally build today - I think performance there is much more likely to
be tied to something like the DBMS. On the other hand, the web has
rapidly evolved to be the first place most people go for any kind of
information, so in the future that might mean talking to some
specialized chip. I wouldn't rule out the possibility.
-- Walt
More information about the UPHPU
mailing list