Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(proto): use memmove on amd64 for int columns #9

Merged
merged 4 commits into from
Dec 30, 2021

Conversation

tdakkota
Copy link
Contributor

name                      old time/op    new time/op     delta
ColInt16_DecodeColumn-12    1.00µs ± 1%     0.10µs ± 2%   -90.47%  (p=0.000 n=23+24)

name                      old speed      new speed       delta
ColInt16_DecodeColumn-12  1.99GB/s ± 1%  20.89GB/s ± 2%  +949.06%  (p=0.000 n=23+24)

name                      old time/op    new time/op     delta
ColInt16_DecodeColumn-12    1.00µs ± 1%     0.10µs ± 2%   -90.47%  (p=0.000 n=23+24)

name                      old speed      new speed       delta
ColInt16_DecodeColumn-12  1.99GB/s ± 1%  20.89GB/s ± 2%  +949.06%  (p=0.000 n=23+24)
@codecov
Copy link

codecov bot commented Dec 29, 2021

Codecov Report

Merging #9 (95b7894) into main (0906ee7) will decrease coverage by 0.70%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main       #9      +/-   ##
==========================================
- Coverage   82.50%   81.79%   -0.71%     
==========================================
  Files          77      103      +26     
  Lines        4355     4219     -136     
==========================================
- Hits         3593     3451     -142     
- Misses        623      627       +4     
- Partials      139      141       +2     
Impacted Files Coverage Δ
proto/col_date32_gen.go 100.00% <ø> (ø)
proto/col_date_gen.go 100.00% <ø> (ø)
proto/col_datetime64_gen.go 100.00% <ø> (ø)
proto/col_datetime_gen.go 100.00% <ø> (ø)
proto/col_decimal128_gen.go 100.00% <ø> (ø)
proto/col_decimal256_gen.go 100.00% <ø> (ø)
proto/col_decimal32_gen.go 100.00% <ø> (ø)
proto/col_decimal64_gen.go 100.00% <ø> (ø)
proto/col_enum16_gen.go 100.00% <ø> (ø)
proto/col_enum8_gen.go 100.00% <ø> (ø)
... and 43 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0906ee7...95b7894. Read the comment docs.

@ernado
Copy link
Collaborator

ernado commented Dec 30, 2021

name                           old time/op    new time/op     delta
ColBool_Raw_DecodeColumn-32      1.82µs ± 2%     1.82µs ± 2%       ~     (p=0.587 n=5+5)
ColBool_DecodeColumn-32          23.2µs ± 1%     23.8µs ± 1%     +2.77%  (p=0.008 n=5+5)
ColDate32_DecodeColumn-32         737ns ± 4%       73ns ± 1%    -90.07%  (p=0.008 n=5+5)
ColDate_DecodeColumn-32           712ns ± 3%       47ns ± 6%    -93.37%  (p=0.008 n=5+5)
ColDateTime64_DecodeColumn-32     790ns ± 2%      128ns ± 3%    -83.78%  (p=0.008 n=5+5)
ColDateTime_DecodeColumn-32       730ns ± 2%       73ns ± 1%    -89.98%  (p=0.008 n=5+5)
ColDecimal128_DecodeColumn-32    2.52µs ± 2%     2.54µs ± 2%       ~     (p=0.421 n=5+5)
ColDecimal256_DecodeColumn-32    3.61µs ± 1%     3.62µs ± 1%       ~     (p=0.452 n=5+5)
ColDecimal32_DecodeColumn-32      732ns ± 1%       72ns ± 1%    -90.13%  (p=0.008 n=5+5)
ColDecimal64_DecodeColumn-32      795ns ± 2%      128ns ± 1%    -83.86%  (p=0.008 n=5+5)
ColEnum16_DecodeColumn-32         704ns ± 2%       46ns ± 2%    -93.42%  (p=0.008 n=5+5)
ColEnum8_DecodeColumn-32          273ns ± 2%       42ns ± 3%    -84.52%  (p=0.008 n=5+5)
ColFixedStr_DecodeColumn-32       707ns ± 2%      699ns ± 1%       ~     (p=0.151 n=5+5)
ColFloat32_DecodeColumn-32        733ns ± 1%       74ns ± 3%    -89.95%  (p=0.008 n=5+5)
ColFloat64_DecodeColumn-32        795ns ± 3%      128ns ± 1%    -83.86%  (p=0.008 n=5+5)
ColInt128_DecodeColumn-32        2.56µs ± 2%     2.54µs ± 2%       ~     (p=0.151 n=5+5)
ColInt16_DecodeColumn-32          711ns ± 4%       46ns ± 1%    -93.47%  (p=0.008 n=5+5)
ColInt256_DecodeColumn-32        3.61µs ± 2%     3.61µs ± 1%       ~     (p=0.841 n=5+5)
ColInt32_DecodeColumn-32          735ns ± 1%       73ns ± 0%    -90.09%  (p=0.016 n=5+4)
ColInt64_DecodeColumn-32          783ns ± 1%      128ns ± 1%    -83.70%  (p=0.008 n=5+5)
ColInt8_DecodeColumn-32           279ns ± 2%       42ns ± 1%    -84.96%  (p=0.008 n=5+5)
ColIPv4_DecodeColumn-32           731ns ± 2%       73ns ± 1%    -90.05%  (p=0.008 n=5+5)
ColIPv6_DecodeColumn-32          2.52µs ± 2%     2.53µs ± 1%       ~     (p=0.548 n=5+5)
ColRaw_DecodeColumn-32           1.40µs ± 1%     1.42µs ± 1%     +1.67%  (p=0.024 n=5+5)
ColStr_DecodeColumn-32           30.7µs ± 2%     31.1µs ± 1%       ~     (p=0.095 n=5+5)
ColTuple_DecodeColumn-32         5.76µs ± 3%     5.78µs ± 1%       ~     (p=0.548 n=5+5)
ColUInt128_DecodeColumn-32       2.52µs ± 2%     2.54µs ± 2%       ~     (p=0.421 n=5+5)
ColUInt16_DecodeColumn-32         707ns ± 3%       47ns ± 1%    -93.38%  (p=0.008 n=5+5)
ColUInt256_DecodeColumn-32       3.57µs ± 1%     3.59µs ± 2%       ~     (p=0.548 n=5+5)
ColUInt32_DecodeColumn-32         726ns ± 2%       72ns ± 1%    -90.08%  (p=0.008 n=5+5)
ColUInt64_DecodeColumn-32         776ns ± 1%      127ns ± 1%    -83.58%  (p=0.008 n=5+5)
ColUInt8_DecodeColumn-32         52.5ns ± 1%     52.9ns ± 2%       ~     (p=0.794 n=5+5)
ColUUID_DecodeColumn-32          64.2µs ± 2%     63.7µs ± 3%       ~     (p=0.841 n=5+5)
ServerHello_Decode/Struct-32      467ns ± 3%      477ns ± 2%       ~     (p=0.056 n=5+5)
ServerHello_Decode/Raw-32         181ns ± 3%      185ns ± 2%       ~     (p=0.111 n=5+5)

name                           old speed      new speed       delta
ColBool_Raw_DecodeColumn-32    27.4GB/s ± 2%   27.5GB/s ± 2%       ~     (p=0.690 n=5+5)
ColBool_DecodeColumn-32        2.16GB/s ± 1%   2.10GB/s ± 1%     -2.71%  (p=0.008 n=5+5)
ColDate32_DecodeColumn-32      5.43GB/s ± 4%  54.61GB/s ± 1%   +906.39%  (p=0.008 n=5+5)
ColDate_DecodeColumn-32        2.81GB/s ± 3%  42.37GB/s ± 5%  +1408.60%  (p=0.008 n=5+5)
ColDateTime64_DecodeColumn-32  10.1GB/s ± 2%   62.5GB/s ± 3%   +516.87%  (p=0.008 n=5+5)
ColDateTime_DecodeColumn-32    5.48GB/s ± 2%  54.70GB/s ± 2%   +898.17%  (p=0.008 n=5+5)
ColDecimal128_DecodeColumn-32  6.34GB/s ± 1%   6.31GB/s ± 2%       ~     (p=0.421 n=5+5)
ColDecimal256_DecodeColumn-32  8.87GB/s ± 1%   8.84GB/s ± 1%       ~     (p=0.421 n=5+5)
ColDecimal32_DecodeColumn-32   5.46GB/s ± 1%  55.38GB/s ± 1%   +913.64%  (p=0.008 n=5+5)
ColDecimal64_DecodeColumn-32   10.1GB/s ± 2%   62.4GB/s ± 1%   +519.66%  (p=0.008 n=5+5)
ColEnum16_DecodeColumn-32      2.84GB/s ± 2%  43.19GB/s ± 2%  +1418.91%  (p=0.008 n=5+5)
ColEnum8_DecodeColumn-32       3.67GB/s ± 2%  23.70GB/s ± 3%   +545.90%  (p=0.008 n=5+5)
ColFixedStr_DecodeColumn-32    45.2GB/s ± 2%   45.8GB/s ± 1%       ~     (p=0.151 n=5+5)
ColFloat32_DecodeColumn-32     5.46GB/s ± 1%  54.36GB/s ± 3%   +895.62%  (p=0.008 n=5+5)
ColFloat64_DecodeColumn-32     10.1GB/s ± 3%   62.4GB/s ± 1%   +519.55%  (p=0.008 n=5+5)
ColInt128_DecodeColumn-32      6.24GB/s ± 2%   6.30GB/s ± 2%       ~     (p=0.151 n=5+5)
ColInt16_DecodeColumn-32       2.81GB/s ± 4%  43.06GB/s ± 1%  +1430.74%  (p=0.008 n=5+5)
ColInt256_DecodeColumn-32      8.86GB/s ± 2%   8.87GB/s ± 1%       ~     (p=0.841 n=5+5)
ColInt32_DecodeColumn-32       5.45GB/s ± 1%  54.94GB/s ± 0%   +908.90%  (p=0.016 n=5+4)
ColInt64_DecodeColumn-32       10.2GB/s ± 1%   62.7GB/s ± 1%   +513.74%  (p=0.008 n=5+5)
ColInt8_DecodeColumn-32        3.58GB/s ± 2%  23.82GB/s ± 1%   +564.77%  (p=0.008 n=5+5)
ColIPv4_DecodeColumn-32        5.47GB/s ± 2%  55.01GB/s ± 1%   +905.24%  (p=0.008 n=5+5)
ColIPv6_DecodeColumn-32        6.35GB/s ± 2%   6.31GB/s ± 1%       ~     (p=0.548 n=5+5)
ColRaw_DecodeColumn-32         45.8GB/s ± 1%   45.1GB/s ± 1%     -1.64%  (p=0.032 n=5+5)
ColStr_DecodeColumn-32         1.07GB/s ± 2%   1.06GB/s ± 1%       ~     (p=0.095 n=5+5)
ColTuple_DecodeColumn-32       26.1GB/s ± 3%   26.0GB/s ± 1%       ~     (p=0.548 n=5+5)
ColUInt128_DecodeColumn-32     6.35GB/s ± 2%   6.30GB/s ± 2%       ~     (p=0.421 n=5+5)
ColUInt16_DecodeColumn-32      2.83GB/s ± 3%  42.73GB/s ± 1%  +1410.63%  (p=0.008 n=5+5)
ColUInt256_DecodeColumn-32     8.96GB/s ± 1%   8.92GB/s ± 2%       ~     (p=0.548 n=5+5)
ColUInt32_DecodeColumn-32      5.51GB/s ± 2%  55.51GB/s ± 1%   +907.76%  (p=0.008 n=5+5)
ColUInt64_DecodeColumn-32      10.3GB/s ± 1%   62.8GB/s ± 1%   +509.07%  (p=0.008 n=5+5)
ColUInt8_DecodeColumn-32       19.0GB/s ± 1%   18.9GB/s ± 2%       ~     (p=0.841 n=5+5)
ColUUID_DecodeColumn-32        12.5GB/s ± 2%   12.6GB/s ± 3%       ~     (p=0.841 n=5+5)
ServerHello_Decode/Struct-32   94.2MB/s ± 4%   92.2MB/s ± 2%       ~     (p=0.056 n=5+5)
ServerHello_Decode/Raw-32       243MB/s ± 2%    238MB/s ± 2%       ~     (p=0.095 n=5+5)

@ernado ernado marked this pull request as ready for review December 30, 2021 10:04
@ernado ernado merged commit 8b4cb51 into ClickHouse:main Dec 30, 2021
@tdakkota tdakkota deleted the feat/unsafe-copying branch December 30, 2021 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants