aboutsummaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* [util] speedup GmTimeR outside LUT intervaltobo2025-02-183-81/+133
| | | | commit_hash:d57be220df393c193619ef5ed129ec4436540629
* Intermediate changesrobot-piglet2025-02-111-1/+3
| | | | commit_hash:f3acde65f4eb25503f414d5262f52b496123bd96
* [util] GmTimeR: use LUT for the tm_yday -> tm_mday conversionswarmer2025-02-111-70/+31
| | | | | Replacing binary search with a look-up table. The performance of which does not depend on the branch predictor, and conversion works equally fast for any dates. commit_hash:fefe9665d0d4b51c2ae09ec2b2816aed30caa57b
* [util] GmTimeR: speedup a bittobo2025-02-101-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | perf before ``` ------------------------------------------------------------------------------- Benchmark Time CPU Iterations ------------------------------------------------------------------------------- BM_GmTimeR 3.61 ns 3.61 ns 194952699 BM_GmTimeRRandom/last_hour 5.04 ns 5.04 ns 136121940 BM_GmTimeRRandom/last_day 5.03 ns 5.03 ns 139883239 BM_GmTimeRRandom/last_month 8.03 ns 8.03 ns 87839823 BM_GmTimeRRandom/last_year 14.9 ns 14.9 ns 46401773 BM_GmTimeRRandom/last_decade 16.9 ns 16.9 ns 41439312 BM_GmTimeRRandom/last_half_centry 16.9 ns 16.9 ns 41225553 ``` perf after ``` ------------------------------------------------------------------------------- Benchmark Time CPU Iterations ------------------------------------------------------------------------------- BM_GmTimeR 3.27 ns 3.27 ns 215390890 BM_GmTimeRRandom/last_hour 4.52 ns 4.52 ns 154869504 BM_GmTimeRRandom/last_day 4.53 ns 4.53 ns 155409964 BM_GmTimeRRandom/last_month 7.24 ns 7.24 ns 96972146 BM_GmTimeRRandom/last_year 13.5 ns 13.5 ns 51957829 BM_GmTimeRRandom/last_decade 15.5 ns 15.5 ns 45192135 BM_GmTimeRRandom/last_half_centry 15.4 ns 15.4 ns 45526906 ``` commit_hash:ac9db56d93a25c3a3018cfbb6bc5800da3d001ee
* GmTimeR x2 speeduptobo2025-02-081-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | performance comparison againt standard gmtime\_r ``` ------------------------------------------------------------------------------- Benchmark Time CPU Iterations ------------------------------------------------------------------------------- BM_GmTimeR 3.66 ns 3.66 ns 189855900 BM_gmtime_r 18.7 ns 18.7 ns 37340999 BM_GmTimeRRandom/last_hour 5.12 ns 5.12 ns 136126173 BM_gmtime_r_Random/last_hour 19.2 ns 19.2 ns 36556971 BM_GmTimeRRandom/last_day 5.10 ns 5.10 ns 138257644 BM_gmtime_r_Random/last_day 19.2 ns 19.2 ns 37025160 BM_GmTimeRRandom/last_month 7.10 ns 7.10 ns 98235494 BM_gmtime_r_Random/last_month 20.4 ns 20.4 ns 34637975 BM_GmTimeRRandom/last_year 15.0 ns 15.0 ns 46664304 BM_gmtime_r_Random/last_year 26.8 ns 26.8 ns 26135911 BM_GmTimeRRandom/last_decade 17.2 ns 17.2 ns 40105536 BM_gmtime_r_Random/last_decade 27.0 ns 27.0 ns 25817056 BM_GmTimeRRandom/last_half_centry 17.1 ns 17.0 ns 41066079 BM_gmtime_r_Random/last_half_century 26.8 ns 26.7 ns 26215076 ``` commit_hash:33747760ad46412f50fe3cb06f4c438794a44492
* Intermediate changesrobot-piglet2025-02-071-1/+20
| | | | commit_hash:21bc37ea2a290cb645c95fe2c94882484c7001a4
* Introduce TMemoryPool::TBookmarkppavel962025-02-042-0/+61
| | | | | | Данный PR добавляет класс TMemoryPool::TBookmark, запомниющий текущее состояние пула при создании и восстанавливающий это состояние в деструкторе. В случае, если в пуле успел смениться текущий чанк, то очищается только последний чанк. commit_hash:cfeb77912864d25d5d8c34739915c504e289770a
* Fix -Wnon-virtual-dtor in util and gtest wrapperthegeorg2025-01-231-0/+1
| | | | commit_hash:d8917bc04e6ab10b341000f8bb98d456223f0307
* clang-format 18 in STYLE_CPPalevitskii2025-01-209-62/+65
| | | | | clang-format 18 in STYLE\_CPP commit_hash:e2018ac17a95817f09e131ee6d5316b2bdc2d39e
* Fix util build for WASM32 platform.vchigrin2025-01-171-1/+5
| | | | commit_hash:14cab8a6f31c744cf717b9b093109987ceae7654
* Intermediate changesrobot-piglet2025-01-131-0/+2
| | | | commit_hash:afb0e5dfd167841b49b56adc86c88a1e9f5492c6
* Intermediate changesrobot-piglet2025-01-031-2/+2
| | | | commit_hash:150f0a7b765d0ba270d9e42834bcf4c074ca0524
* Do not yield GLOBAL define regarding current C++ runtimethegeorg2025-01-031-1/+2
| | | | | | This codesearch query yields all the results (i. e. only `yexception_ut.cpp` depends on this define): HIDDEN_URL commit_hash:9cac855ba71451e3691fc514a5a423173c3a8aae
* Remove non-existing functions.akhropov2024-12-244-21/+2
| | | | commit_hash:ff6e98554280ce1c021da5272fde9421374a643d
* Add using for TCowStringmikhnenko2024-12-221-0/+3
| | | | commit_hash:4173484eaeb8e4dd6ea84e26ae7f496e35785564
* Add assertions for range bounds validityakhropov2024-12-185-6/+22
| | | | commit_hash:4417c6200b3fc4e3e6e61648412d263366935fdf
* Fix misspellingakhropov2024-12-181-1/+1
| | | | commit_hash:c7d6839d95bf6b9f1d0fa4081d4ecc66a1503de9
* Rename ya.common to linters.make.incalevitskii2024-12-161-0/+0
| | | | | | | Rename ya.common to linters.make.inc Функциональность не меняется commit_hash:5897b8089a65cd5a5902d32bb4f6db2f570467b6
* Remove std::nullptr_t ctor for TStringdgolear2024-12-093-7/+4
| | | | commit_hash:6b02e6cb83bde366477f7d53b6cd6c00bffdb4d6
* More functions marked as noexcept.akhropov2024-11-301-7/+7
| | | | commit_hash:61b2ca8fab66696aade476173e07001d1b886b5e
* removed redundant code after CTAD c++-17 featurevtrunov2024-11-281-8/+1
| | | | commit_hash:6f4c98369177b376ac1c9dfba18ee5464c558c95
* Remove noexcept from operator== because it is not guaranteed that operator== ↵akhropov2024-11-281-1/+1
| | | | | | for elements is noexcept. commit_hash:2457980ced7a2f91cefec1ea20ff13bfb5c7c2cf
* Add assert to front()akhropov2024-11-281-0/+2
| | | | commit_hash:b46dfbc7a684061be1b6e3eca5d7e312ff3e71f4
* util/ysaveload: support std::unordered_map std::unordered_setzankin2024-11-252-25/+208
| | | | commit_hash:e6d07240418ce606f7bdc9fef30cf2d87f1f456f
* Intermediate changesrobot-piglet2024-11-231-7/+1
| | | | commit_hash:d0db92345dc96a43a16424238c1eb2812040a13d
* Remove TRbTree and TAvlTree from forward declarations as they are not in utilakhropov2024-11-211-6/+0
| | | | commit_hash:7f3c30234700758cc6218bdef0fa2e6862f2c32e
* Part of PR. Stylenae2022024-11-2051-371/+705
| | | | | Часть большого ПР REVIEW:7264088 commit_hash:0f5b03fbbed0ac30f734943309e3ef5cd4d7a30e
* /util: streaming CityHasha11ax2024-11-202-0/+83
| | | | commit_hash:bd4032fbf4c4ece089ad071747194b38df6c5edd
* Add a clarifying comment about exceptions in TryFromString* functionsakhropov2024-11-191-0/+1
| | | | commit_hash:60b664d99f74a0d1ec00e0ab843e87583a5360a4
* Add external autoincludes.jsonalevitskii2024-11-141-0/+3
| | | | | Add external autoincludes.json commit_hash:1b3de1732fee590582ae5620570facc2c0987390
* Remove methods Data, Size, Empty from TStringmikhnenko2024-11-061-0/+4
| | | | | | | If this pr has broken something, try using the methods named with a small letter \[nodiff:caesar\] commit_hash:c08a737938cff39577c6e47d4434531f6355e4c2
* add ::element_type, .get() to smart pointers for better compatibility with stdpavook2024-11-042-0/+75
| | | | | For example, this makes it possible to use gtest pointer matchers on smart pointers commit_hash:2650074ae18ee35696b297d3d1f0393e7350789f
* [util] migrate to STYLE_CPPalevitskii2024-10-282-0/+17
| | | | | | | | | | | (HIDDEN_URL \[util\] migrate to STYLE_CPP В рамках работы над линтерной моделью мигрируем на новый макрос [`STYLE_CPP`](HIDDEN_URL в связке с механизмом автоинклудов. Цели для линтинга теперь берутся из макроса `SRCS`. Пути к заголовочным файлам, расположенным не в одном каталоге с `ya.make`, рекомендуется явно перечислять в `SRCS` или воспользоваться макросом [`HEADERS`](HIDDEN_URL Механизм работы автоинклудов описан в документации, см. примечание <HIDDEN_URL> commit_hash:eb991ca8cfe26bf83871579225303c1b93c2e85c
* Remove static method max_size from TStringmikhnenko2024-10-251-1/+1
| | | | commit_hash:c6fad0009855affb407cba47af8ea60ca834a890
* remove unused includes in util/generic/string.htobo2024-10-172-2/+2
| | | | commit_hash:edd5ed00db3a4c6090c535fa406f184268188733
* nodiscard attribute for the TReserveTagswarmer2024-10-161-1/+1
| | | | commit_hash:cb3317dd036b226397730ad8c04a5f1a22f0b164
* StringSplitter: recreate State after copyswarmer2024-10-162-0/+58
| | | | commit_hash:75f3a4a20b797f07c51c63b96f0f1e1374707f33
* include singleton.h only if neededtobo2024-10-081-1/+3
| | | | | использование Singleton спрятано за #ifndef _LIBCPP_VERSION - прячем инклуд аналогично commit_hash:0f8b0d3bee5ac020dd26dcadddb41b28164f4022
* check lifetime bound of TString const iteratorsswarmer2024-10-041-8/+30
| | | | | | | | | ex: ``` auto it = TString{"temporary"}.cbegin(); use(*it); ``` commit_hash:68f621e7b2d608340d7b9f5a9a246c138a2eafff
* check lifetime bound of TString cast and Detach operatorsswarmer2024-09-281-3/+3
| | | | commit_hash:43fb3eff8779379efe5955f3f48cef3bf8e3a894
* [util] Add move assignment operator in TBlobdenisostashov2024-09-271-0/+6
| | | | | [util] Add move assignment operator to TBlob commit_hash:00a4eb013dbf72cbb95bd5df0bb190f693edb166
* check lifetime bound of TString modifier member functionsswarmer2024-09-261-69/+69
| | | | commit_hash:5e1acbf4a0eaeb2ff1b7648f90af6bc4f41312e2
* check lifetime bound of output streamsswarmer2024-09-266-20/+21
| | | | commit_hash:17de7afe0f415c511e587b2f2607cbbc2348742e
* Support move-only key types in the Max/MinElementBy routinesswarmer2024-09-262-4/+14
| | | | | It is also slightly faster for non-trivial key types. commit_hash:4104cabfe8dc9a51174034c62aae25be16b57bf9
* Make TNothing nodiscardvadim-xd2024-09-251-1/+1
| | | | commit_hash:6ff089c6f629be6a68a94d1e1ee648630f8568d2
* faster implicit `TString` → `const std::string&` conversion: using ↵swarmer2024-09-242-1/+14
| | | | | | | template operator TStringType& to deprioritize non-const method Converting a `TString` to a `const std::string&` should not cause data cloning. commit_hash:df425bd56f8517d882444e15f3cc586af92d90b3
* Use unified remove function in TFsPath.sath2024-09-232-11/+9
| | | | | | | | | | | | | | Текущая реализация не удаляет readonly файлы под Windows Для остальных систем ``` ::unlink ::rmdir ``` равноценно вызову ``` remove ``` commit_hash:99a45d03ae667ec82e57ca8fa7500bae9f827086
* Disable cast to string& from TSring&&mikhnenko2024-09-231-1/+1
| | | | commit_hash:9d13cf8c2f490f6590afada455248339a63b6bf8
* Enable clang-format FixNamespaceComments optiondmasloff2024-09-051-2/+2
| | | | | Enable clang-format FixNamespaceComments option 8ffd1b7f4787cdf4e80a92b08f07634abe416854
* FixNamespaceComments in /utildmasloff2024-09-05286-363/+363
| | | | | FixNamespaceComments in /util bb9152570d7c258798644ead5a59f604de05ef3b