Hello again, The single most expensive function (on intel x86) is seed_curve() ; the expensive part is todB(): #define todB(x) ((x)==0?-9.e40:log(fabs(x))*8.6858896) We don't need all this precision: int choice=(int)((todB(amp)-specmax+specatt)/10.-1.5); Simplest, fastest way is only portable over ieee[78]54 fp: take a bitmask over amp, do some right shift, do a table lookup. This should save ~ 25-30% If no-one else implements it, I will; just wait a few days, I'm afraid. Bye bye, Segher --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/