[Shootout-list] What people say about shootout

Jon Harrop jon@ffconsultancy.com
Fri, 29 Apr 2005 22:09:00 +0100


On Friday 29 April 2005 21:00, Isaac Gouy wrote:
> Please correct me where I'm wrong, it seems that
> - single precision is faster than double precision

Only if you are loading or storing a lot of floats.

> - some languages only provide double precision

Also, some languages provide only double precision for arithmetic but both=
=20
single and double for storage (e.g. OCaml).

> - we might code the same algorithm using doubles and get the same
> result

You are unlikely to get exactly the same result. The ray tracer, for exampl=
e,=20
produces different output which looks indistinguishable, i.e. it is=20
approximately the same but not exactly the same. So we'd have to start=20
allowing some variation in "correct" answers.

> - the practical consequence is that Python would be slower than
> languages that provide distinct single precision data type

=46rom what little I know of Python, the difference between floating point=
=20
precisions will be a very minor reason for its poor performance.

=2D-=20
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists