Ah yes, that does help, thanks. I've read that essay in the past, but it
was a good re-read!
On Thu, 14 Nov 2024 at 11:24, Ian Lance Taylor wrote:
> On Wed, Nov 13, 2024 at 1:28 PM ben...@gmail.com
> wrote:
> >
> > > Personally I mostly think that is OK. One of the guidelines that Go
> > > foll
On Wed, Nov 13, 2024 at 1:28 PM ben...@gmail.com wrote:
>
> > Personally I mostly think that is OK. One of the guidelines that Go
> > follows is to encourage people to write code rather than write types.
> > To me this falls into writing types.
>
>
> I'm intrigued by this concept, but I don't real
Thanks. I was about to reply with why I think we need it and then realized
that my case does not justify it.
All I needed is a constraint that restricts to a set of known types which
is available using the or op.
On Wed, Nov 13, 2024, 19:23 Ian Lance Taylor wrote:
> On Wed, Nov 13, 2024 at 8:59
Personally I mostly think that is OK. One of the guidelines that Go
follows is to encourage people to write code rather than write types.
To me this falls into writing types.
I'm intrigued by this concept, but I don't really know what it means. I've
seen your (Ian's) similar comments at
htt
There are a few options for post-processing, all within the set of
supported Go APIs. One is to use the `-focus` flag of `go tool pprof` so it
only displays samples that match a particular call stack. If the code to be
profiled is in a single function, that might be all you need. Another is to
set
On Wed, Nov 13, 2024 at 8:59 AM Elad Gavra wrote:
>
> I would like to create a non-pointer constraint for a generic function.
> For example:
> ```
> func F[T NonPtr](p T) {
> // do something with p
> }
> ```
> Such that
> ```
> F(MyStruct{}) // allowed
> F(&MyStruct{}) // disallowed, compile time
Hi,
I would like to create a non-pointer constraint for a generic function.
For example:
```
func F[T NonPtr](p T) {
// do something with p
}
```
Such that
```
F(MyStruct{}) // allowed
F(&MyStruct{}) // disallowed, compile time
```
I'm aiming to ensure, in compile-time, that a generic function, whi
On Wed, Nov 13, 2024, 5:31 AM Jason E. Aten wrote:
> All good. I still think that the hack of blocking and restoring the
> runtime's SIGPROF signal
> handler might actually work though. It might not work. But if it does, it
> is almost
> exactly what you were looking for.
>
> Ian or others more
Hi, I wrote a package to hash any comparable type:
https://pkg.go.dev/gitlab.eif.urjc.es/paurea/dohash
In contrast to https://github.com/dolthub/maphash it can use any
hash function (as long as it implements hash.Hash64) and it does
not depend on any internal detail of the runtime.
It works by i
(On gopherslack, the #darkarts folks are performance oriented)
On Wed, Nov 13, 2024 at 1:30 PM Jason E. Aten wrote:
> All good. I still think that the hack of blocking and restoring the
> runtime's SIGPROF signal
> handler might actually work though. It might not work. But if it does, it
>
All good. I still think that the hack of blocking and restoring the
runtime's SIGPROF signal
handler might actually work though. It might not work. But if it does, it
is almost
exactly what you were looking for.
Ian or others more knowledgeable myself might be able to advise better if
it _should_
On Wednesday 13 November 2024 at 12:02:12 UTC Jason E. Aten wrote:
> I've tried but this unfortunately, the Start and Stop processes are too
expensive and really require writing to a different file for every stop.
The nature of the program means I need to do the Start/Stop process 60+
times per
> I've tried but this unfortunately, the Start and Stop processes are too
expensive and really require writing to a different file for every stop.
The nature of the program means I need to do the Start/Stop process 60+
times per second, so it would generate a lot of files and be very slow on
top.
Thank's Jason. These are all good ideas:
On Wednesday 13 November 2024 at 02:06:56 UTC Jason E. Aten wrote:
Idea 0: Can you just click on the graphviz boxes in the pprof http page
for your section and then just show the source for only those?
Might give you a quick idea of which are the hottest
On Wednesday 13 November 2024 at 06:05:36 UTC scott beeker wrote:
2. **Start Profiling**: Use `pprof.StartCPUProfile(file)` to start
profiling, where `file` is an `os.File` object to write the profile data.
3. **Restrict Profiling**: Place `pprof.StartCPUProfile()` before the code
section you w
15 matches
Mail list logo