Skip to content

Commit

Permalink
Little better #2770
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-milovidov committed Sep 18, 2018
1 parent 765b85e commit 9ff5f28
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dbms/src/Functions/FunctionsDateTime.h
Expand Up @@ -1586,7 +1586,6 @@ class FunctionFormatDateTime : public IFunction
void (*operation)(char *&, UInt32, const DateLUTImpl &) = nullptr;

private:
static constexpr char digits[] = "0123456789";
const char * source;
size_t source_position_to_copy = 0;
size_t source_length_to_copy = 0;
Expand All @@ -1606,7 +1605,7 @@ class FunctionFormatDateTime : public IFunction
do
{
--width;
*--ep = digits[v % 10]; /// TODO v % 10 + '0' should be better (one arithmetic op vs. load from L1 cache)
*--ep = '0' + v % 10;
} while (v /= 10);

while (--width >= 0)
Expand Down

0 comments on commit 9ff5f28

Please sign in to comment.