Re: [Haskell-cafe] [Somewhat OT] Speed

2008-10-29 Thread Andrew Coppin
Richard O'Keefe wrote: On 29 Oct 2008, at 8:31 am, Andrew Coppin wrote: Hi guys. This isn't specifically to do with Haskell, but... does anybody have any idea roughly how fast various CPU operations are? For example, is integer arithmetic faster or slower than floating-point? Is addition

Re: [Haskell-cafe] [Somewhat OT] Speed

2008-10-29 Thread Christopher Lane Hinson
OK, well thanks for the info. I'm not really interested in getting down to instruction-level scheduling. I just want to know, at a high level, will implementing my algorithm in integer arithmetic rather than floating-point make a measurable difference to overall program speed. Actually,

Re: [Haskell-cafe] [Somewhat OT] Speed

2008-10-29 Thread Richard O'Keefe
On 30 Oct 2008, at 9:22 am, Andrew Coppin wrote: I'm not really interested in getting down to instruction-level scheduling. I just want to know, at a high level, will implementing my algorithm in integer arithmetic rather than floating-point make a measurable difference to overall program

[Haskell-cafe] [Somewhat OT] Speed

2008-10-28 Thread Andrew Coppin
Hi guys. This isn't specifically to do with Haskell, but... does anybody have any idea roughly how fast various CPU operations are? For example, is integer arithmetic faster or slower than floating-point? Is addition faster or slower than multiplication? How much slower are the

Re: [Haskell-cafe] [Somewhat OT] Speed

2008-10-28 Thread J. Garrett Morris
On Tue, Oct 28, 2008 at 12:31 PM, Andrew Coppin [EMAIL PROTECTED] wrote: This isn't specifically to do with Haskell, but... does anybody have any idea roughly how fast various CPU operations are? Yes: it's architecture dependent. I imagine you'll need to make your questions at least somewhat

Re: [Haskell-cafe] [Somewhat OT] Speed

2008-10-28 Thread Andrew Coppin
J. Garrett Morris wrote: On Tue, Oct 28, 2008 at 12:31 PM, Andrew Coppin [EMAIL PROTECTED] wrote: This isn't specifically to do with Haskell, but... does anybody have any idea roughly how fast various CPU operations are? Yes: it's architecture dependent. I imagine you'll need to make

Re: [Haskell-cafe] [Somewhat OT] Speed

2008-10-28 Thread Henning Thielemann
On Tue, 28 Oct 2008, Andrew Coppin wrote: Hi guys. This isn't specifically to do with Haskell, but... does anybody have any idea roughly how fast various CPU operations are? Unfortunately, the knowledge I acquired for Z80 and MC68000 is no longer of that importance today. It's still

Re: [Haskell-cafe] [Somewhat OT] Speed

2008-10-28 Thread Thomas DuBuisson
Well, if you want to get down to that level: http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25112.PDF page 273 http://www.intel.com/design/processor/manuals/248966.pdf Appendix C Thomas On Tue, Oct 28, 2008 at 7:35 PM, Andrew Coppin [EMAIL PROTECTED]wrote: J. Garrett

Re: [Haskell-cafe] [Somewhat OT] Speed

2008-10-28 Thread David Roundy
On Tue, Oct 28, 2008 at 08:55:59PM +0100, Henning Thielemann wrote: For example, is integer arithmetic faster or slower than floating-point? In principle integer arithmetic is simpler and faster. But your processor may do it in the same time. Indeed. Usually there are more integer

Re: [Haskell-cafe] [Somewhat OT] Speed

2008-10-28 Thread Richard O'Keefe
On 29 Oct 2008, at 8:31 am, Andrew Coppin wrote: Hi guys. This isn't specifically to do with Haskell, but... does anybody have any idea roughly how fast various CPU operations are? For example, is integer arithmetic faster or slower than floating- point? Is addition faster or slower than

Re: [Haskell-cafe] [Somewhat OT] Speed

2008-10-28 Thread wren ng thornton
Richard O'Keefe wrote: Rough guesses: integer adds, subtracts, and compares are fast, integer multiplies and divides are much slower, slow enough that compilers go to some trouble to do something else when multiplying or dividing by a constant. Typically, these days (for both int and