frostfs-sdk-go/object
Evgenii Stratonikov 665e5807bc [#188] transformer: Allow to provide size hint
For big objects with known size we can optimize allocation patterns
by providing size hint. As with any hint, it does not affect transformer
functionality: slices with capacity > MaxSize are never allocated.

```
goos: linux
goarch: amd64
pkg: git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/transformer
cpu: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
                                                │     out     │
                                                │   sec/op    │
Transformer/small/no_size_hint-8                  65.44µ ± 3%
Transformer/small/no_size_hint,_with_buffer-8     64.24µ ± 5%
Transformer/small/with_size_hint,_with_buffer-8   58.70µ ± 5%
Transformer/big/no_size_hint-8                    367.8m ± 3%
Transformer/big/no_size_hint,_with_buffer-8       562.7m ± 0%
Transformer/big/with_size_hint,_with_buffer-8     385.6m ± 7%
geomean                                           5.197m

                                                │     out      │
                                                │     B/op     │
Transformer/small/no_size_hint-8                  13.40Ki ± 0%
Transformer/small/no_size_hint,_with_buffer-8     13.40Ki ± 0%
Transformer/small/with_size_hint,_with_buffer-8   13.39Ki ± 0%
Transformer/big/no_size_hint-8                    288.0Mi ± 0%
Transformer/big/no_size_hint,_with_buffer-8       1.390Gi ± 0%
Transformer/big/with_size_hint,_with_buffer-8     288.0Mi ± 0%
geomean                                           2.533Mi

                                                │    out     │
                                                │ allocs/op  │
Transformer/small/no_size_hint-8                  92.00 ± 0%
Transformer/small/no_size_hint,_with_buffer-8     92.00 ± 0%
Transformer/small/with_size_hint,_with_buffer-8   92.00 ± 0%
Transformer/big/no_size_hint-8                    546.5 ± 0%
Transformer/big/no_size_hint,_with_buffer-8       607.5 ± 0%
Transformer/big/with_size_hint,_with_buffer-8     545.5 ± 0%
geomean                                           228.1
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-10-30 12:13:04 +00:00
..
id [#161] *: Do not use math/rand.Read() 2023-09-08 17:17:02 +03:00
relations Rename package name 2023-03-07 15:47:21 +03:00
test Rename package name 2023-03-07 15:47:21 +03:00
transformer [#188] transformer: Allow to provide size hint 2023-10-30 12:13:04 +00:00
attribute.go Rename package name 2023-03-07 15:47:21 +03:00
attribute_test.go Rename package name 2023-03-07 15:47:21 +03:00
error.go [#64] object: move package from neofs-api-go 2021-11-09 09:57:37 +03:00
error_test.go Rename package name 2023-03-07 15:47:21 +03:00
fmt.go Rename package name 2023-03-07 15:47:21 +03:00
fmt_test.go [#190] Refactor cryptographic functionality 2022-04-19 12:55:11 +03:00
lock.go Rename package name 2023-03-07 15:47:21 +03:00
lock_test.go Rename package name 2023-03-07 15:47:21 +03:00
object.go [#23] pre-commit: Add golangci-lint hook 2023-03-09 22:53:14 +03:00
object_test.go Rename package name 2023-03-07 15:47:21 +03:00
range.go Rename package name 2023-03-07 15:47:21 +03:00
range_test.go Rename package name 2023-03-07 15:47:21 +03:00
raw.go Rename package name 2023-03-07 15:47:21 +03:00
raw_test.go [#52] Remove storage groups and audit 2023-05-03 08:20:37 +00:00
search.go Rename package name 2023-03-07 15:47:21 +03:00
search_test.go [#161] *: Do not use math/rand.Read() 2023-09-08 17:17:02 +03:00
splitid.go Move to frostfs-sdk-go 2022-12-14 09:59:29 +03:00
splitid_test.go Rename package name 2023-03-07 15:47:21 +03:00
splitinfo.go Rename package name 2023-03-07 15:47:21 +03:00
splitinfo_test.go Rename package name 2023-03-07 15:47:21 +03:00
tombstone.go Rename package name 2023-03-07 15:47:21 +03:00
tombstone_test.go [#161] *: Do not use math/rand.Read() 2023-09-08 17:17:02 +03:00
type.go [#52] Remove storage groups and audit 2023-05-03 08:20:37 +00:00
type_test.go [#52] Remove storage groups and audit 2023-05-03 08:20:37 +00:00
wellknown_attributes.go [#215] object: Add well-known FilePath attribute 2022-09-06 17:21:37 +04:00