Re: [linux-audio-dev] Float to int conversions

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Float to int conversions
From: Daniel V. (dvenkita_AT_rand.ss.ecel.uwa.edu.au)
Date: Thu Nov 01 2001 - 13:38:15 EET


On Thu, Nov 01, 2001 at 08:26:59PM +1100, Erik de Castro Lopo wrote:
> Hi all,
>
> I have recently written a paper titled "Faster Floating Point to Integer Conversions"
> which can be read here:
>
> http://mega-nerd.com/FPcast/
>
> From the introduction:
>
> In many applications such as audio, video and graphics processing, calculations
> are done with floating point values and the final results converted to integer.
> There are a number of ways of converting from floating point to integer with the
> C cast mechanism being the most commonly used. Unfortunately, casting from float
> or double to int on i386 can cause large performance hits when this operation
> is used frequently.
>
> If the programmer considers the speed of the operation more important that the
> type of conversion between float and int, speed improvements of 6 to 10 times can
> be achieved on Pentium III and Athlon CPUs. It is highly likely this is also the
> case on other processors such as PowerPC.
>
> This paper investigates the reasons why the C cast operation which is so important
> for many applications is so slow and provides an alternative which aims to be
> as portable as possible.
>
> Hope people find this useful.

That's very helpful, looks like a lot of work has been put into it.
Thanks :)

Daniel.

-- 
*-*
Daniel Venkitachalam                                  venki-d_AT_ee.uwa.edu.au
University of Western Australia               www.ecel.uwa.edu.au/~dvenkita
.... .  .  .   .    .     .      .       .        .         .             .  
___________________________________________________________________________


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Nov 01 2001 - 13:34:12 EET