On Aug 26, 2012 6:50 PM, "Bluehorn" <blue...@gmail.com> wrote:
>
> If the "range" keyword is used in the "for" loops, will array/slice index bound checking be disabled?
>
They are not disabled. It's much better, they're not at all needed while using the range statement ;-)
-j
I'm new to the Go language, trying to convert some algorithms previously written in C into Go packages. I got about 2x run time in Go compared to C.
The algorithm mainly uses 2-dimensional matrix operations. In Go, slice of slices are used instead of 2-dimension matrices in C. I suspect that the run time difference is mainly due to bound checking on array access. After studying the Go documents and searching this group, I'm still not sure of the following question:
If the "range" keyword is used in the "for" loops, will array/slice index bound checking be disabled?
Is "-gcflags -B" still supported in go1.0.2? I suppose it was gone already.
Thanks for the suggestion.
With "-compiler=gccgo -gccgoflags=-O3", I got the run time down to about 130% of the C equivalent. That is encouraging :)
I guess future improvement in the Go tools may bring better results. For now, it is good enough for me to go on to convert my other programs into Go packages.
Cheers!
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/397c0824-b5b5-412d-974e-b53f56d29a82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I know this is an old thread, but is -B still supported?
It has been, yes, and unless it changed in the last few weeks, it still is.I use to to measure cost as an awareness metric, but seldom run that way. Go is safe until you do that, then it becomes unsafe. Too risky for serious use.
On Sun, Jun 16, 2019 at 4:53 AM Ugorji Nwoke <ugo...@gmail.com> wrote:
I know this is an old thread, but is -B still supported?--
On Monday, August 27, 2012 at 2:09:19 AM UTC-4, minux wrote:
On Monday, August 27, 2012, bluehorn wrote:Is "-gcflags -B" still supported in go1.0.2? I suppose it was gone already.
It is still there.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/397c0824-b5b5-412d-974e-b53f56d29a82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.