Re: [go-nuts] go execution speed for float64 based calculations vs float32

2019-04-22 Thread L Godioleskky
Thanks guys for the cogent clarifications..I will now forget about converting to float32 on 64-bit CPUs I'm in the process of converting my often-used C-code apps to Go because I see tremendous advantages of Go vs C. I've been using C,C++ for many years and only recently discovered Go... My Go k

Re: [go-nuts] go execution speed for float64 based calculations vs float32

2019-04-22 Thread Marvin Renich
* lgod...@gmail.com [190421 21:56]: > ?? On 64-bit CPUs does anyone have any experience comparing the run-time > speed of float64 based calculations vs float32 ? > > Some of my C-code when translated to Go-code seems to run noticeably > slower, so I'm wondering if I can speed things up by conve

Re: [go-nuts] go execution speed for float64 based calculations vs float32

2019-04-22 Thread Marvin Renich
* lgod...@gmail.com [190422 01:57]: > I note that this issue has been dealt with in a previous post > https://groups.google.com/forum/#!topic/golang-nuts/n12khle-mlY > The gist of which seems to suggest that 32-bit is faster than 64 That thread was specific to integer remainder (%) and is irrel

Re: [go-nuts] go execution speed for float64 based calculations vs float32

2019-04-22 Thread Robert Engels
The email you cite is for integers. Integer math is not performed by the fpu - so it is not the same. > On Apr 22, 2019, at 12:57 AM, lgod...@gmail.com wrote: > > I note that this issue has been dealt with in a previous post > https://groups.google.com/forum/#!topic/golang-nuts/n12khle-mlY >

Re: [go-nuts] go execution speed for float64 based calculations vs float32

2019-04-21 Thread lgodio2
I note that this issue has been dealt with in a previous post https://groups.google.com/forum/#!topic/golang-nuts/n12khle-mlY The gist of which seems to suggest that 32-bit is faster than 64 On Sunday, April 21, 2019 at 10:09:09 PM UTC-4, Robert Engels wrote: > > At least on intel, float64 shoul

Re: [go-nuts] go execution speed for float64 based calculations vs float32

2019-04-21 Thread Robert Engels
At least on intel, float64 should be faster than float32 since all math is done on the fpu in 64 bits, so it needs to be converted, but the memory bus also comes into play. I would doubt it. Float32 is designed for size not performance. > On Apr 21, 2019, at 8:55 PM, lgod...@gmail.com wrote:

[go-nuts] go execution speed for float64 based calculations vs float32

2019-04-21 Thread lgodio2
?? On 64-bit CPUs does anyone have any experience comparing the run-time speed of float64 based calculations vs float32 ? Some of my C-code when translated to Go-code seems to run noticeably slower, so I'm wondering if I can speed things up by converting float vars to float32 vs float64 -- Y