-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go 1.21 update list #3089
Comments
clear() -> |
|
|
BTW, some new built-in funcs may have their experimental analogues like |
We need to update |
FYI,
yields:
|
For 100k:
|
Yields this:
|
It's an experimental format, usually I've created an issue for specific language update related topic, but we have huge number of Go repositories and replicating these issues into all of them isn't practical, replicating one issue is more feasible. And most of the time they're solved all at once.
So, when we're to drop support for 1.20, the following things should be done:
min()
/max()
where appropriateIt's not easy to identify all cases where it's applicable, but there are likely some and we can search a bit for them. We also have some time before 1.20 is out, so leave comments if you notice something in the code
clear()
to reset mapsWe certainly have cases where a new map is created and old one is forgotten, because dropping elements one by one is no fun. Now we can
clear()
and reuse old maps which is supposed to be more efficient. Also add a comment if there are some known places in the code for it.slice.Clean()
withclear()
slice.Reverse()
withslices.Reverse()
util/slice
completelyslices.BinarySearch()
andslices.BinarySearchFunc()
We have a number of places with
sort.Search()
, likely they can be improvedslices.Compact()
where applicablePublicKeys.Unique()
or other deduplication cases.slices.Sort()
instead ofsort.Slice
where applicableslices
functions where applicablemaps
package where applicableThis doesn't seem to be as useful as
slices
, but some use cases can probably be foundbytes.AvailableBuffer()
Some serialization code likely can be improved with it.
crypto/elliptic
thingserrors.ErrUnsupported
where applicablesync.OnceFunc
(we have cases like that) and OnceValue(s) (maybe)The text was updated successfully, but these errors were encountered: