Re: [go-nuts] Bitmask is slower than modulo calculation

2024-05-12 Thread leon
; different from the code in your email. If you want people to help you > should make it easier for people to test the behavior of your code. > > On Sat, May 11, 2024 at 9:58 PM leon wrote: > >> I'm trying to prove an optimization technique for ring buffer is >> effecti

[go-nuts] Bitmask is slower than modulo calculation

2024-05-11 Thread leon
I'm trying to prove an optimization technique for ring buffer is effective. One of the technique is using bitmask instead of modulo to calculate a wrap around. However, in my environment, modulo is slightly faster in a test where 1 billion items are enqueued /dequeued by a single goroutine. What

[go-nuts] Re: [security] Go 1.11.5 and Go 1.10.8 are released

2019-01-23 Thread Leon Klingele
The release tarballs include two new directories: "gocache" and "tmp". Any special reason for that? -- 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+un

[go-nuts] Re: The "declared and not used" error

2017-12-01 Thread peter . leon
Go will throw an error when a variable isnt 'used' ( which is often the case when developing ), but will not throw errors if the code has unnecessary loops, logical errors, or other more serious problems. This does not make the code better, nor the coder magically reflect on how their code can b

Re: [go-nuts] How to run (individual) tests and benchs of the stdlib?

2017-10-21 Thread Leon Klingele
Hi Dave, > you must use the source that matches the version of Go thanks for clarifying. Finally I am able to run the latest benchs :) -- 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

Re: [go-nuts] How to run (individual) tests and benchs of the stdlib?

2017-10-21 Thread Leon Klingele
`go test crypto/tls/...` indeed works fine (from $HOME), but I want to run benchmarks as well, which fails: ``` $ pwd /home/leon $ go test -bench crypto/tls/... can't load package: package .: no Go files in /home/leon ``` ``` $ go env | grep "GO\(PATH\|ROOT\).*" GOPATH="/home

[go-nuts] Re: Trying to understand GOPATH

2016-09-23 Thread leon . johnson
Thanks for the response, it makes sense now. On Friday, September 23, 2016 at 12:13:30 AM UTC-4, leon.j...@gmail.com wrote: > > I'm new to golang, and I'm trying to understand the role of GOPATH. The OS > X package from https://golang.org/dl/ installs to `/usr/local/go/bin/go`. > > Do I have to

[go-nuts] Trying to understand GOPATH

2016-09-22 Thread leon . johnson
I'm new to golang, and I'm trying to understand the role of GOPATH. The OS X package from https://golang.org/dl/ installs to `/usr/local/go/bin/go`. Do I have to manually symlink /usr/local/go/bin/go to my PATH because the GOPATH docs lead me to believe that GOPATH to need to be set to the dir

Re: [go-nuts] Re: Dynamic type cloning

2016-08-02 Thread Guianu Leon
something you may or may not > want to accommodate. > > > > On Tue, 2 Aug 2016 at 16:58, roger peppe wrote: > >> On 2 August 2016 at 16:46, Guianu Leon wrote: >> > Well I will only get the fields that have to be updated, not the entire >> > object. Therefore

Re: [go-nuts] Re: Dynamic type cloning

2016-08-02 Thread Guianu Leon
Well I will only get the fields that have to be updated, not the entire object. Therefore I need to get the old object from the database, see what has changed, then insert it back. On Aug 2, 2016 18:35, "roger peppe" wrote: > On 2 August 2016 at 09:58, Rayland wrote: > > I am working in the con

Re: [go-nuts] Understanding HTTP server latencies

2016-07-18 Thread Guianu Leon
The client and the server are two separate machines in aws. No middlewares and proxies. I don't get any network related error. On Jul 18, 2016 17:48, "Peter Waller" wrote: > If you run it on the same server as the host, does it perform differently > there? For example, did you rule out network s