diff options
author | Alexander Fokin <apfokin@gmail.com> | 2022-02-10 16:45:38 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:38 +0300 |
commit | bf9e69a933f89af083d895185f01ed65e4d90766 (patch) | |
tree | b2cc84ee7850122e7ccf51d0ea21e4fa7e7a5685 /util/stream/file.cpp | |
parent | 863a59a65247c24db7cb06789bc5cf79d04da32f (diff) | |
download | ydb-bf9e69a933f89af083d895185f01ed65e4d90766.tar.gz |
Restoring authorship annotation for Alexander Fokin <apfokin@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'util/stream/file.cpp')
-rw-r--r-- | util/stream/file.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util/stream/file.cpp b/util/stream/file.cpp index 3e8b881a8b..dc5d2f6311 100644 --- a/util/stream/file.cpp +++ b/util/stream/file.cpp @@ -25,13 +25,13 @@ size_t TUnbufferedFileInput::DoRead(void* buf, size_t len) { size_t TUnbufferedFileInput::DoSkip(size_t len) { if (len < 384) { - /* Base implementation calls DoRead, which results in one system call - * instead of three as in fair skip implementation. For small sizes - * actually doing one read is cheaper. Experiments show that the - * border that separates two implementations performance-wise lies - * in the range of 384-512 bytes (assuming that the file is in OS cache). */ + /* Base implementation calls DoRead, which results in one system call + * instead of three as in fair skip implementation. For small sizes + * actually doing one read is cheaper. Experiments show that the + * border that separates two implementations performance-wise lies + * in the range of 384-512 bytes (assuming that the file is in OS cache). */ return IInputStream::DoSkip(len); - } + } /* TFile::Seek can seek beyond the end of file, so we need to do * size check here. */ @@ -40,8 +40,8 @@ size_t TUnbufferedFileInput::DoSkip(size_t len) { i64 newPos = File_.Seek(Min<i64>(size, oldPos + len), sSet); return newPos - oldPos; -} - +} + TUnbufferedFileOutput::TUnbufferedFileOutput(const TString& path) : File_(path, CreateAlways | WrOnly | Seq) { |