From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,2cb1c7dcdf4349e1 X-Google-Attributes: gid111c93,public From: lindahl@pbm.com (Greg Lindahl) Subject: Re: sin() on alpha. Date: 1998/05/23 Message-ID: <6k6t8g$2jd@news3.newsguy.com>#1/1 X-Deja-AN: 355876195 References: <6k5od1$1b7$1@palladium.transmeta.com> Organization: a guest of Shadow Island Games Newsgroups: comp.os.linux.alpha torvalds@transmeta.com (Linus Torvalds) writes: > Remember: if you can make a small and simple routine that avoids one > cache miss, that one cache miss is often more costly than the cost of > the whole routine. This is less true of more complex functions like > sin() and cos(), but it's still something that is easily overlooked, This is very true. I would suspect that the Cray "vector" sin() cos() and other library functions might have completely different implementations for this reason; when you know you are computing with a warm cache, you can use different algorithms... so if your compiler is already doing vector analysis, you can get a big win. -- g