1
0
mirror of https://github.com/golang/go synced 2024-07-05 09:50:19 +00:00
go/api
Changkun Ou 395323c4d0 sync: add new Map method Swap, CompareAndSwap, CompareAndDelete
name                                                   time/op
SwapCollision/*sync_test.DeepCopyMap-8                  235ns ± 0%
SwapCollision/*sync_test.RWMutexMap-8                   145ns ± 0%
SwapCollision/*sync.Map-8                               153ns ± 0%
SwapMostlyHits/*sync_test.DeepCopyMap-8                48.2µs ± 0%
SwapMostlyHits/*sync_test.RWMutexMap-8                  190ns ± 0%
SwapMostlyHits/*sync.Map-8                             28.3ns ± 0%
SwapMostlyMisses/*sync_test.DeepCopyMap-8               681ns ± 0%
SwapMostlyMisses/*sync_test.RWMutexMap-8                336ns ± 0%
SwapMostlyMisses/*sync.Map-8                            523ns ± 0%
CompareAndSwapCollision/*sync_test.DeepCopyMap-8       3.99ns ± 0%
CompareAndSwapCollision/*sync_test.RWMutexMap-8         151ns ± 0%
CompareAndSwapCollision/*sync.Map-8                    21.6ns ± 0%
CompareAndSwapNoExistingKey/*sync_test.DeepCopyMap-8   3.95ns ± 0%
CompareAndSwapNoExistingKey/*sync_test.RWMutexMap-8     126ns ± 0%
CompareAndSwapNoExistingKey/*sync.Map-8                6.11ns ± 0%
CompareAndSwapValueNotEqual/*sync_test.DeepCopyMap-8   2.15ns ± 0%
CompareAndSwapValueNotEqual/*sync_test.RWMutexMap-8     132ns ± 0%
CompareAndSwapValueNotEqual/*sync.Map-8                5.32ns ± 0%
CompareAndSwapMostlyHits/*sync_test.RWMutexMap-8        219ns ± 0%
CompareAndSwapMostlyHits/*sync.Map-8                   27.1ns ± 0%
CompareAndSwapMostlyMisses/*sync_test.DeepCopyMap-8    13.0ns ± 0%
CompareAndSwapMostlyMisses/*sync_test.RWMutexMap-8      147ns ± 0%
CompareAndSwapMostlyMisses/*sync.Map-8                 19.6ns ± 0%
CompareAndDeleteCollision/*sync_test.DeepCopyMap-8     2.23ns ± 0%
CompareAndDeleteCollision/*sync_test.RWMutexMap-8       131ns ± 0%
CompareAndDeleteCollision/*sync.Map-8                  16.2ns ± 0%
CompareAndDeleteMostlyHits/*sync_test.RWMutexMap-8      367ns ± 0%
CompareAndDeleteMostlyHits/*sync.Map-8                 33.1ns ± 0%
CompareAndDeleteMostlyMisses/*sync_test.DeepCopyMap-8  8.75ns ± 0%
CompareAndDeleteMostlyMisses/*sync_test.RWMutexMap-8    134ns ± 0%
CompareAndDeleteMostlyMisses/*sync.Map-8               10.9ns ± 0%

name                                                   alloc/op
SwapCollision/*sync_test.DeepCopyMap-8                   336B ± 0%
SwapCollision/*sync_test.RWMutexMap-8                   0.00B
SwapCollision/*sync.Map-8                               16.0B ± 0%
SwapMostlyHits/*sync_test.DeepCopyMap-8                82.1kB ± 0%
SwapMostlyHits/*sync_test.RWMutexMap-8                  12.0B ± 0%
SwapMostlyHits/*sync.Map-8                              28.0B ± 0%
SwapMostlyMisses/*sync_test.DeepCopyMap-8                713B ± 0%
SwapMostlyMisses/*sync_test.RWMutexMap-8                23.0B ± 0%
SwapMostlyMisses/*sync.Map-8                             129B ± 0%
CompareAndSwapCollision/*sync_test.DeepCopyMap-8        0.00B
CompareAndSwapCollision/*sync_test.RWMutexMap-8         0.00B
CompareAndSwapCollision/*sync.Map-8                     3.00B ± 0%
CompareAndSwapNoExistingKey/*sync_test.DeepCopyMap-8    8.00B ± 0%
CompareAndSwapNoExistingKey/*sync_test.RWMutexMap-8     8.00B ± 0%
CompareAndSwapNoExistingKey/*sync.Map-8                 8.00B ± 0%
CompareAndSwapValueNotEqual/*sync_test.DeepCopyMap-8    0.00B
CompareAndSwapValueNotEqual/*sync_test.RWMutexMap-8     0.00B
CompareAndSwapValueNotEqual/*sync.Map-8                 0.00B
CompareAndSwapMostlyHits/*sync_test.RWMutexMap-8        18.0B ± 0%
CompareAndSwapMostlyHits/*sync.Map-8                    33.0B ± 0%
CompareAndSwapMostlyMisses/*sync_test.DeepCopyMap-8     24.0B ± 0%
CompareAndSwapMostlyMisses/*sync_test.RWMutexMap-8      23.0B ± 0%
CompareAndSwapMostlyMisses/*sync.Map-8                  23.0B ± 0%
CompareAndDeleteCollision/*sync_test.DeepCopyMap-8      0.00B
CompareAndDeleteCollision/*sync_test.RWMutexMap-8       0.00B
CompareAndDeleteCollision/*sync.Map-8                   0.00B
CompareAndDeleteMostlyHits/*sync_test.RWMutexMap-8      23.0B ± 0%
CompareAndDeleteMostlyHits/*sync.Map-8                  39.0B ± 0%
CompareAndDeleteMostlyMisses/*sync_test.DeepCopyMap-8   16.0B ± 0%
CompareAndDeleteMostlyMisses/*sync_test.RWMutexMap-8    15.0B ± 0%
CompareAndDeleteMostlyMisses/*sync.Map-8                15.0B ± 0%

name                                                   allocs/op
SwapCollision/*sync_test.DeepCopyMap-8                   2.00 ± 0%
SwapCollision/*sync_test.RWMutexMap-8                    0.00
SwapCollision/*sync.Map-8                                1.00 ± 0%
SwapMostlyHits/*sync_test.DeepCopyMap-8                  4.00 ± 0%
SwapMostlyHits/*sync_test.RWMutexMap-8                   1.00 ± 0%
SwapMostlyHits/*sync.Map-8                               2.00 ± 0%
SwapMostlyMisses/*sync_test.DeepCopyMap-8                6.00 ± 0%
SwapMostlyMisses/*sync_test.RWMutexMap-8                 2.00 ± 0%
SwapMostlyMisses/*sync.Map-8                             6.00 ± 0%
CompareAndSwapCollision/*sync_test.DeepCopyMap-8         0.00
CompareAndSwapCollision/*sync_test.RWMutexMap-8          0.00
CompareAndSwapCollision/*sync.Map-8                      0.00
CompareAndSwapNoExistingKey/*sync_test.DeepCopyMap-8     1.00 ± 0%
CompareAndSwapNoExistingKey/*sync_test.RWMutexMap-8      0.00
CompareAndSwapNoExistingKey/*sync.Map-8                  1.00 ± 0%
CompareAndSwapValueNotEqual/*sync_test.DeepCopyMap-8     0.00
CompareAndSwapValueNotEqual/*sync_test.RWMutexMap-8      0.00
CompareAndSwapValueNotEqual/*sync.Map-8                  0.00
CompareAndSwapMostlyHits/*sync_test.RWMutexMap-8         2.00 ± 0%
CompareAndSwapMostlyHits/*sync.Map-8                     3.00 ± 0%
CompareAndSwapMostlyMisses/*sync_test.DeepCopyMap-8      2.00 ± 0%
CompareAndSwapMostlyMisses/*sync_test.RWMutexMap-8       2.00 ± 0%
CompareAndSwapMostlyMisses/*sync.Map-8                   2.00 ± 0%
CompareAndDeleteCollision/*sync_test.DeepCopyMap-8       0.00
CompareAndDeleteCollision/*sync_test.RWMutexMap-8        0.00
CompareAndDeleteCollision/*sync.Map-8                    0.00
CompareAndDeleteMostlyHits/*sync_test.RWMutexMap-8       2.00 ± 0%
CompareAndDeleteMostlyHits/*sync.Map-8                   3.00 ± 0%
CompareAndDeleteMostlyMisses/*sync_test.DeepCopyMap-8    2.00 ± 0%
CompareAndDeleteMostlyMisses/*sync_test.RWMutexMap-8     1.00 ± 0%
CompareAndDeleteMostlyMisses/*sync.Map-8                 1.00 ± 0%

Fixes #51972

Change-Id: I469e71033592997832c3e8ebdad1b8950a70c99c
Reviewed-on: https://go-review.googlesource.com/c/go/+/399094
Run-TryBot: Changkun Ou <mail@changkun.de>
Reviewed-by: Joedian Reid <joedian@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
2022-11-15 17:35:42 +00:00
..
next sync: add new Map method Swap, CompareAndSwap, CompareAndDelete 2022-11-15 17:35:42 +00:00
except.txt syscall: remove FreeBSD 11 and below 64bit inode compatibility shims 2022-09-16 01:17:28 +00:00
go1.1.txt strconv: quote rune 007F as \x7f, not \u007f 2022-03-31 20:37:15 +00:00
go1.2.txt api: add go1.2.txt, use in tests 2013-10-18 13:36:59 +09:00
go1.3.txt api: add go1.3.txt 2014-06-02 11:45:00 +09:00
go1.4.txt [release-branch.go1.4] api: create go1.4.txt 2014-12-12 14:01:01 +11:00
go1.5.txt api: update go1.5.txt 2015-07-30 21:14:09 +00:00
go1.6.txt go/types: rename Importer2 to ImporterFrom 2016-01-13 23:40:13 +00:00
go1.7.txt unicode: upgrade to version 9.0.0 2016-06-28 15:08:11 +00:00
go1.8.txt Revert "cmd/go: note when some Go files were ignored on no-Go-files errors" 2016-12-21 05:25:57 +00:00
go1.9.txt cmd/api: set architecture sizes when type checking 2021-10-04 20:20:20 +00:00
go1.10.txt text/template: revert CL 66410 "add break, continue actions in ranges" 2018-02-06 05:00:01 +00:00
go1.11.txt crypto/tls: make ConnectionState.ExportKeyingMaterial a method 2018-08-22 03:48:56 +00:00
go1.12.txt api: add os.(*File).SyscallConn to go1.12.txt 2019-01-02 21:21:53 +00:00
go1.13.txt api/go1.13: add debug/elf.Symbol fields added in CL 184099 2019-08-08 18:44:16 +00:00
go1.14.txt go/types: unexport Checker.LookupFieldOrMethod 2020-01-31 14:46:05 +00:00
go1.15.txt go/printer: remove exported StdFormat flag 2020-07-17 02:15:01 +00:00
go1.16.txt api/go1.16: add go/build/constraint APIs 2021-01-27 21:11:22 +00:00
go1.17.txt cmd/api: set architecture sizes when type checking 2021-10-04 20:20:20 +00:00
go1.18.txt runtime/debug: replace (*BuildInfo).Marshal methods with Parse and String 2022-02-09 19:44:03 +00:00
go1.19.txt debug/pe: add IMAGE_FILE_MACHINE_LOONGARCH{64,32} 2022-06-29 22:29:34 +00:00
go1.txt encoding/xml: add, support Marshaler interface 2013-08-14 14:58:28 -04:00
README cmd/api: require proposal # for new API features 2022-03-14 21:43:16 +00:00

Files in this directory are data for Go's API checker ("go tool api", in src/cmd/api).

Each file is a list of API features, one per line.

go1.txt (and similarly named files) are frozen once a version has been
shipped. Each file adds new lines but does not remove any.

except.txt lists features that may disappear without breaking true
compatibility.

Starting with go1.19.txt, each API feature line must end in "#nnnnn"
giving the GitHub issue number of the proposal issue that accepted
the new API. This helps with our end-of-cycle audit of new APIs.
The same requirement applies to next/* (described below), which will
become a go1.XX.txt for XX >= 19.

The next/ directory contains the only files intended to be mutated.
Each file in that directory contains a list of features that may be added
to the next release of Go. The files in this directory only affect the
warning output from the go api tool. Each file should be named
nnnnn.txt, after the issue number for the accepted proposal.
(The #nnnnn suffix must also appear at the end of each line in the file;
that will be preserved when next/*.txt is concatenated into go1.XX.txt.)