thanks to the Info, don't have profiled this overhead… It was just an assumtion.
Am Donnerstag, 30. Januar 2020 18:12:50 UTC+1 schrieb Jake Montgomery: > > > > On Thursday, January 30, 2020 at 2:31:59 AM UTC-5, Andreas Otto wrote: >> >> >> >> Am Mittwoch, 29. Januar 2020 23:19:34 UTC+1 schrieb Bruno Albuquerque: >>> >>> One way to work this around is to use >>> https://github.com/mattn/go-pointer. >>> >>> >>> thanks, but also use this kind of "*HASH based and export the hash >> handle*" solution. >> But I call this a "slow" solution, because of the *hash* and *locks* >> overhead. >> > > You may call it "slow", but have you actually profiled it in your real > world application and found the map lookup to be an actual bottleneck? > Unless you are doing something very extreme I would expect the overhead of > the Go/C transitions to vastly outweigh a map lookup. Of course, if that is > the case there are clever things you could do to reduce the lookup > overhead, but they would depend on the exact details of the extreme thing > you are doing that makes it a problem in the first place. > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c5655eac-295f-49c4-bbe5-f44fbc975200%40googlegroups.com.