Mateusz Poliwczak

Results 81 comments of Mateusz Poliwczak

I belive that another problem with `testing.Iterate()` would be with escape analysis. Right? It would cause heap allocations when returning pointer types, so it might cause bad benchmarking results.

This happens because, the `config.Fprint` here: https://github.com/golang/go/blob/994d1d446663873dd593846a0b94147410e5922a/src/go/format/format.go#L71-L81 formats the source as: ```go "//go:build\n\npackage A\n\nimport ()\n\nfunc A() {\n\t0 0\n}\n" ``` This wrong formatting happens here: https://github.com/golang/go/blob/994d1d446663873dd593846a0b94147410e5922a/src/go/printer/printer.go#L1371-L1373

@randall77 > The runtime reads from /dev/urandom on every startup. Does it? On linux when there is random in auxv, then it does not even open it. https://github.com/golang/go/blob/f17b28de78e7b2debd555f84a0e48be010e4fc88/src/runtime/rand.go#L44-L58

FYI, the Reader is a var and people might change it to a custom Reader implementation. I wonder whether that might be an issue for us here? > The proposal...

Also it seems like plan9 always opens `/dev/urandom`, so i guess it might not always exist. Maybe we can replace it with some kind of syscall? https://github.com/golang/go/blob/74a49188d300076d6fc6747ea7678d327c5645a1/src/crypto/rand/rand_plan9.go#L36-L49 CC @0intro

FYI the current API sets implicitly the type for the user: https://github.com/golang/net/blob/b8d88774daf2a7cf137dad5173fc9bb981fc18fb/dns/dnsmessage/message.go#L1375 What is the `(b *Builder) SVCBResource()` going to do for the zero value of Type? Return an error?...

Personally i would just share a struct, but duplicate methods for `SVCB/HTTPS` in Builder and the Parser. EDIT: not going to help here https://github.com/golang/net/blob/b8d88774daf2a7cf137dad5173fc9bb981fc18fb/dns/dnsmessage/message.go#L510 though.

> I'm a little bit uncomfortable about using a map here, since it's going to be a bit less efficient (we'll always need to copy and sort the keys on...

@neild I have added an EDIT just as you commented: https://github.com/golang/go/issues/43790#issuecomment-2790593894 It is not going to help entirely.