Matt Joiner

Results 751 comments of Matt Joiner

This could be worthwhile, I expect Bytes is used heavily in a few spots. Are there any benchmarks for this for real-world cases? metainfo.Info, and peer_protocol.Msg, and possibly some krpc...

Do you want to try optimizing the reflected form? Can you add a benchmark unit test for the Copy first?

I suspect it has to do with ensuring that marshalling an unmarshalled Info that did previously contain "private" does not change the infohash. It might take an extended check to...

I've had issues with net.Addr.String allocating too much in the past. I'm worried about changing this.

It's an interesting idea, and I like your intrusive ipv4 in ipv6 test, but I'm loathe to change this without more tests and benchmarks. Especially regarding the connLessTrusted call, which...

It's our interface, I'd rather not confuse it with the proxy one. If proxy.Dialer also implements Network though, I'm okay with it, since it would communicate that a proxy.Dialer is...

This would actually be way more interesting on Client.torrents, where would probably see some performance gains.

I would like to see that the existing code is a performance bottleneck first before complicating this.

Is there some evidence this is a performance bottleneck to begin with?

Consider that we can't even guarantee users of reader will stop using it. And if we created a wrapper type that detached itself from the existing reader, it would require...