[GRLUG] sysadmin job opening
Bob Kline
bob.kline at gmail.com
Mon Feb 1 10:43:08 EST 2010
Code written in "C" routinely executes
90% as fast as the assembly code
written by a typical programmer. But
that's not a straightforward comparison
either. It depends on how well the optimizers
in a compiler work - pretty well in gcc I think.
But there are also optimizers for assemblers
which can literally rearrange code in order to
get the maximum work done per CPU cycle.
It takes a long time, but it can be done.
All of these things are expensive, and likely
worth it only for time critical applications,
and, I'd think, the core pieces of an OS that
get used frequently. Execution profiles can
show what those are, and where it pays to
spend time and money.
But good programmers in assembly
are not common, and probably mostly get
gobbled up by the military, and other
organizations where speed is crucial and
cost is no object.
Etc. Leading to the question, if PHP is
so bad, why is it so prominently used? Why
are so many willingly using garbage? Or,
why is it that some think it's good?
Most people have their own little bag of
tricks that will get many small things done
quickly. Many of us conjure small shell
scripts, and save them, to do many
little file manipulation and other chores.
Most of them will never become real,
maintained, programs, but get the job
done. It's when something bigger and
marketable is wanted that the choice of
platform has to be made.
So why PHP? Is there something unique
that only it does? Or is it maybe that finding
people that know something about it
is easier than finding people who know
something about a better approach?
--Bob
On Mon, Feb 1, 2010 at 10:24 AM, Adam Tauno Williams <awilliam at whitemice.org
> wrote:
> On Mon, 2010-02-01 at 10:01 -0500, Bob Kline wrote:
> > Uhmmm, isn't execution speed and
> > coding speed the usual tradeoff with
> > high level languages? A shell script
> > can get small things done in a hurry.
> > No one expects it to execute fast. Or
> > should anyway.
>
> Once upon a time; these days, for most use-cases, the difference is
> pretty minimal. But PHP performance in many cases is *BAD*, as in
> terrible, as in minutes vs. seconds.
>
> > Isn't it usually the case that one
> > needs a compiled version of high
> > level code before the speed improves?
> > As in an order of magnitude and more?
>
> No. It might be true if that 'low-level' code was always optimal, but
> it isn't. So while maybe true in some theoretical sense this simply is
> not true in reality.
>
> > High level languages keep people
> > from having to learn things like assembly
> > language and "C," reduce expensive
> > labor costs, and exploit cheaper, faster
> > hardware, but I'd of thought that it was
> > clear what the price of them is.
> > They are relatively slow. You never get
> > it all.
>
> With current optimizing aot runtimes this is simply no longer true.
>
>
>
> _______________________________________________
> grlug mailing list
> grlug at grlug.org
> http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shinobu.grlug.org/pipermail/grlug/attachments/20100201/2784089c/attachment.htm
More information about the grlug
mailing list