summaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/misc/guid.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Speed up NYT::Formatbabenko2026-06-131-66/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Profile-driven optimizations of the `Format` hot path, benchmarked against a representative master debug log (structured `"Key: %v"` messages dominated by GUIDs, strings, integers, bools and durations). Median improvements of ~15-20% across the workload, measured on a dedicated host. Changes: - `string_builder`: use `resize_uninitialized` in `DoReserve` to avoid zero-filling the buffer on every `Format` call. - `format`: replace the per-argument `memchr` (`spec.Contains('n')`) with an inline scan, force-inline `RunFormatterAt`, and add a `FormatString` fast path for the common plain `%v` / empty spec. - `guid`: rewrite `WriteGuidToBuffer` using a `clz`-derived digit count and a back-to-front fill instead of the per-magnitude branch cascade (cut from ~26% to ~12% of a GUID-heavy line). Validated against an `%x` reference over 2M random GUIDs plus edge cases. Also adds `library/cpp/yt/string/benchmark` to track `Format` performance. ### Benchmarks Median ns/op (lower is better), pinned core on a dedicated Xeon E5-2650 v2, 9x1s repetitions. See `library/cpp/yt/string/benchmark`. | Benchmark | What it formats | Before | After | Speedup | | --- | --- | ---: | ---: | ---: | | `ManyMixedArgs` | ~18 args: GUIDs, strings, duration, ints | 1030 | 833 | -19% | | `StringAndTwoGuids` | literal prefix + two GUIDs | 233 | 185 | -21% | | `IntAndGuid` | one int + one GUID | 205 | 179 | -13% | | `ManyInts` | six integers | 389 | 340 | -13% | | `Guid` | a single GUID | 156 | 131 | -16% | | `String` | a single string | 139 | 104 | -25% | | `Int` | a single integer | 142 | 120 | -15% | | `NoArgs` | a literal with no arguments | 88.8 | 85.7 | -3% | commit_hash:ce9957a06c3ff28b2889aa65fbbddf4ca444f9fe
* YT-22593: More trivial TString->std::string migrationsbabenko2025-02-221-2/+2
| | | | | [nodiff:runtime] commit_hash:1ba799aed1703ab7c6304b6da7090b3337f768dd
* YT-21233: Remove TSimpleException and teach TCompositeException storing ↵arkady-e1ppa2024-03-281-0/+2
| | | | | | | simple attributes Expand the CompositeException 9a10ec65bfc1df854e03bb3a4d8d0a0c0e4a3a5d
* More TGuid helpersbabenko2023-11-251-0/+11
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.babenko2022-02-101-38/+38
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.babenko2022-02-101-38/+38
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.ignat2022-02-101-128/+128
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.ignat2022-02-101-128/+128
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.max422022-02-101-18/+18
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.max422022-02-101-18/+18
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.prime2022-02-101-19/+19
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.prime2022-02-101-19/+19
|
* intermediate changesDevtools Arcadia2022-02-071-0/+203
ref:cde9a383711a11544ce7e107a78147fb96cc4029