Csound Csound-dev Csound-tekno Search About

double/float times

Date1999-06-11 01:53
FromEd Hall
Subjectdouble/float times
This was done in a great deal of haste, but given some of the claims
made here I just had to make a small test.  In essence, I start with the
wrapper script I used to allow Csound to compile on 64-bit machines
and modified it to convert float to double throughout Csound.  It took
all of fifteen minutes to produce two binaries for Csound 3.54, one
with floats, the other with doubles.  For all I know, the latter is
broken 100 different ways, but at least it ran the "Xanadu" orc and sco
that have been used for benchmarking.  (See:

    http://members.tripod.com/~slinkP/pw_linux/csbench.html

for the benchmark.)

Here are the results:

    float:    95.72 seconds
    double:  107.47 seconds

So the double version is about 12% slower.  Details:

   Dell D333XP 333MHz: Pentium II w/128MB RAM runing RedHat 5.2 Linux.
   Csound 3.54 Compiled with EGCS 1.1.2, options "-O3".  16-bit IRCAM output.

I've listened to the outputs of both versions a couple of times, and
there are very slight differences which appear to have to do with
oscillator phasing (the beats between voices toward the end of the
piece sound just slightly different).  This may be an actual difference
due to 32- vs. 64-bit floating point, or may be some breakage due to
the rather blunt way I did the conversion.  Aesthetically, they were
equivalent--there certainly wasn't anything that would make me prefer
one over the other.

This is really more time than I ever intended to spend on this issue.
Someday I'll benchmark more scores and more platforms, but you'll have
to wait...

		-Ed