On 19 January 2011 03:10, Christopher Schultz
<ch...@christopherschultz.net>wrote:

> Yup: float is the default decimal type. Double-precision takes longer,
> so you have to ask for it.
>

Chris, that's the only comment in your post I'd take issue with.  To my
knowledge, a constant with a fractional part is assumed to be double unless
stated otherwise.  I'm actually interested to know your environment for your
precision.c code, as a single-precision (32-bit) float is only good for 6-7
significant figures and your answers agree to 11sf.  Is your compiler
quietly using IEEE754 64-bit precision, even where you request float?

> I maintain what I said : a programming language which produces a wrong
> > result, without even a warning, for an expression as simple as
> > Long a = (1000 * 60 * 60 * 24 * 365)
> > should be consigned to iPods and stuff, not used for serious things like
> > Tomcat.
>

Andre,

On the contrary: I consider a language that allows one to disable at runtime
bounds checks, overflow checks and any other time overhead to be ideal for
code that gains advantage from being highly performant.  The smaller
Tomcat's overhead, the greater the processing power available for
applications.  In turn, this means fewer joules of heat generated per
request processed, less power and air conditioning load in the data centre,
and hence cheaper application deployments.  Given the number of Tomcat
deployments worldwide, I would expect almost any investment in improving
Tomcat's performance to pay off in terms of reduced total cost to humanity.

"Friendly" languages, on the other hand, are ideal for workstations, where a
few microseconds or milliseconds per iteration rarely matters, or for code
where the cost of execution is vastly outwighed by the cost of development.
I love Smalltalk as a prototyping language, for example; but I don't use it
for the inner loops of genomics code that's optimised to squeeze every piece
of speed of of a particular AMD processor in a cluster, and that takes the
time to process some experimental results down from a year to a day.

Horses for courses.

- Peter

Reply via email to