Re: [go-nuts] Writing SIMD ASM

2022-01-20 Thread 'Sebastien Binet' via golang-nuts
On Fri Jan 21, 2022 at 02:28 CET, Greg Lowe wrote: > Hi team, > > I'm a recent Gopher, and have had great success over the past year > developing an insurance modelling application. The tooling is great, > thanks > to the team for creating it. > > 1) SIMD Workflow > > I've got hot functions in my

Re: [go-nuts] Generics: Whats the best way around limitation that methods can't be parameterized

2022-01-20 Thread 'Dan Kortschak' via golang-nuts
On Thu, 2022-01-20 at 19:05 -0800, Mandolyte wrote: > Or perhaps a hybrid, where the methods call generic functions... > > On Thursday, January 20, 2022 at 7:23:37 PM UTC-5 Ian Lance Taylor > wrote: > > On Thu, Jan 20, 2022 at 3:30 AM Travis Keep > > wrote: > > > > > > I am working on a

Re: [go-nuts] Generics: Whats the best way around limitation that methods can't be parameterized

2022-01-20 Thread Mandolyte
Or perhaps a hybrid, where the methods call generic functions... On Thursday, January 20, 2022 at 7:23:37 PM UTC-5 Ian Lance Taylor wrote: > On Thu, Jan 20, 2022 at 3:30 AM Travis Keep wrote: > > > > I am working on a Pipeline[T, U any] type which receives any number of T > values and in turn

[go-nuts] Re: Writing SIMD ASM

2022-01-20 Thread eric...@arm.com
> I see there's an existing issue to add a bunch of Neon floating point instructions: > https://github.com/golang/go/issues/41092 > > I actually spent a while having a go at adding the instructions myself, but couldn't figure it out. > > I also see that there is also a proposal and a MR to

[go-nuts] Writing SIMD ASM

2022-01-20 Thread Greg Lowe
Hi team, I'm a recent Gopher, and have had great success over the past year developing an insurance modelling application. The tooling is great, thanks to the team for creating it. 1) SIMD Workflow I've got hot functions in my application which are doing element wise operations on float

Re: [go-nuts] Generics: Whats the best way around limitation that methods can't be parameterized

2022-01-20 Thread Ian Lance Taylor
On Thu, Jan 20, 2022 at 3:30 AM Travis Keep wrote: > > I am working on a Pipeline[T, U any] type which receives any number of T > values and in turn emits U values. Pipelines are used to read from databases. > > For instance, this code fetches the ages of 5 people under 50. > > int[] ages >

Re: [go-nuts] Performance of syscall calls vs. CGO

2022-01-20 Thread Ian Lance Taylor
On Thu, Jan 20, 2022 at 2:54 AM Sean wrote: > > I know CGO is not performing well in Golang at the moment. That is true, but we should quantify it. The last time I tested it, a cgo call took about 10 times as long as an ordinary function call. So that is pretty bad if you are calling a tiny

Re: [go-nuts] Type Parameters Proposal: constraint.Number should be replaced with constraints.Integer in the examples

2022-01-20 Thread Ian Lance Taylor
On Thu, Jan 20, 2022 at 2:28 AM Manlio Perillo wrote: > > 1. In > golang.org/design/43651-type-parameters#constraints-apply-even-after-constraint-type-inference, > there is a typo in the F4 function where FromString2 should be > FromStrings2 Thanks, fixed. > 2. In

Re: [go-nuts] Type Parameters Proposal: constraint.Number should be replaced with constraints.Integer in the examples

2022-01-20 Thread Ian Lance Taylor
On Thu, Jan 20, 2022 at 12:12 AM Manlio Perillo wrote: > > I found other 2 issues: > > 1. In golang.org/design/43651-type-parameters#element-constraint-example, > the type SC must use an approximation element ~[]E for V2 and V3 to > compile. > > 2. In the same section, the document should

Re: [go-nuts] Re: golang-announce is blocked in Google Groups?

2022-01-20 Thread Ian Lance Taylor
On Thu, Jan 20, 2022 at 4:51 AM peterGo wrote: > > Jochen, > > I get that message too. > > https://groups.google.com/g/golang-announce > > Google is also trying to lock me out of my gmail accounts, but they do that > all the time. > > I don't think Google puts their best people on security.

[go-nuts] What's the difference between adding a channel vs doing subsequent calls for IO?

2022-01-20 Thread minc....@gmail.com
Hello, I have a function to read from a connection and do some data processing and then write to another connection, the following are 2 different approaches. Here's the first approach without channel and go routines: func (p *Proxy) pipe(from io.Reader, to io.Writer, dataHandler func(input

[go-nuts] Re: golang-announce is blocked in Google Groups?

2022-01-20 Thread peterGo
Jochen, I get that message too. https://groups.google.com/g/golang-announce Google is also trying to lock me out of my gmail accounts, but they do that all the time. I don't think Google puts their best people on security. Peter On Thursday, January 20, 2022 at 6:38:20 AM UTC-5

[go-nuts] golang-announce is blocked in Google Groups?

2022-01-20 Thread Jochen Voss
Hello, It seems that golang-announce is blocked in Google Groups. When I try to access the group, I only get the following message: Banned content warning golang-announce has been identified as containing spam, malware or other malicious content. For more information about content

[go-nuts] Generics: Whats the best way around limitation that methods can't be parameterized

2022-01-20 Thread Travis Keep
I am working on a Pipeline[T, U any] type which receives any number of T values and in turn emits U values. Pipelines are used to read from databases. For instance, this code fetches the ages of 5 people under 50. int[] ages PeopleOrderedByName(Start[Person](). Map(func(p Person) int {

[go-nuts] Performance of syscall calls vs. CGO

2022-01-20 Thread Sean
Hi groups, I know CGO is not performing well in Golang at the moment. If we use a dll will this performance issue decrease? If I do the cgo calls with syscall, will there be no performance improvements? When I think about it, Golang always has to make syscall calls on the os it's running on. For

Re: [go-nuts] Type Parameters Proposal: constraint.Number should be replaced with constraints.Integer in the examples

2022-01-20 Thread Manlio Perillo
Found other issues. 1. In golang.org/design/43651-type-parameters #constraints-apply-even-after-constraint-type-inference, there is a typo in the F4 function where FromString2 should be FromStrings2 2. In

Re: [go-nuts] Type Parameters Proposal: constraint.Number should be replaced with constraints.Integer in the examples

2022-01-20 Thread Manlio Perillo
I found other 2 issues: 1. In golang.org/design/43651-type-parameters#element-constraint-example, the type SC must use an approximation element ~[]E for V2 and V3 to compile. 2. In the same section, the document should add a DoubleDefined2 function, to show the new syntax introduced in