vmware / vmware/go-ipfix

Investigate switching from net.IP to netip.Addr

Open
#321 1 comment 0 reactions 1 assignee View on GitHub

@antoninbas is already working on this.

Since Sep 29, 2023.

Dominant language
Go
Stars
52
Forks
34
Avg merge
9h 39m
Merged PRs (30d)
7

Description

Go 1.18 introduced the net/netip package: https://tip.golang.org/doc/go1.18#netip

Here is a relevant statement about the new package:

The new net/netip package defines a new IP address type, Addr. Compared to the existing net.IP type, the netip.Addr type takes less memory, is immutable, and is comparable so it supports == and can be used as a map key.

netip.Prefix also replaces net.IPNet

Switching from net to net/netip may yield significant performance improvements (reduced CPU and memory usage) for consumers of the go-ipfix library, although it may break backwards-compatibility in some places (should be ok given that there is no v1 major release yet). This should be investigated and measured.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.