Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

opt(Or): Introduce FastParOr to make FastOr concurrent #5

Merged
merged 5 commits into from
May 14, 2021

Conversation

manishrjain
Copy link
Contributor

@manishrjain manishrjain commented May 14, 2021

Benchmarks with 50% CPU load show that FastParOr is 2x faster than FastOr, and 4x the memory usage.

name                                      old time/op    new time/op    delta
RealDataFastOr/census-income_srt-32         1.73ms ±14%    0.91ms ± 1%   -47.73%  (p=0.008 n=5+5)
RealDataFastOr/census-income-32             1.85ms ±14%    0.98ms ± 1%   -47.37%  (p=0.008 n=5+5)
RealDataFastOr/census1881_srt-32            3.67ms ± 5%    2.84ms ± 1%   -22.76%  (p=0.008 n=5+5)
RealDataFastOr/census1881-32                3.19ms ± 3%    4.98ms ± 1%   +56.24%  (p=0.008 n=5+5)
RealDataFastOr/dimension_003-32             14.5ms ±10%     6.4ms ± 1%   -55.94%  (p=0.008 n=5+5)
RealDataFastOr/dimension_008-32             4.57ms ± 5%    1.97ms ± 1%   -56.94%  (p=0.008 n=5+5)
RealDataFastOr/dimension_033-32             4.14ms ± 6%    5.06ms ± 2%   +22.20%  (p=0.008 n=5+5)
RealDataFastOr/uscensus2000-32               860µs ± 4%    1228µs ± 2%   +42.77%  (p=0.008 n=5+5)
RealDataFastOr/weather_sept_85_srt-32       4.34ms ±11%    2.43ms ± 1%   -43.99%  (p=0.008 n=5+5)
RealDataFastOr/weather_sept_85-32           6.96ms ±10%    3.32ms ± 1%   -52.26%  (p=0.008 n=5+5)
RealDataFastOr/wikileaks-noquotes_srt-32    1.39ms ± 5%    1.29ms ± 1%    -7.23%  (p=0.008 n=5+5)
RealDataFastOr/wikileaks-noquotes-32        1.27ms ± 3%    2.62ms ± 1%  +106.27%  (p=0.008 n=5+5)

name                                      old alloc/op   new alloc/op   delta
RealDataFastOr/census-income_srt-32         69.6kB ± 0%   348.3kB ± 0%  +400.18%  (p=0.008 n=5+5)
RealDataFastOr/census-income-32             69.6kB ± 0%   348.3kB ± 0%  +400.16%  (p=0.008 n=5+5)
RealDataFastOr/census1881_srt-32            1.48MB ± 0%    4.12MB ± 0%  +177.76%  (p=0.008 n=5+5)
RealDataFastOr/census1881-32                1.48MB ± 0%    7.41MB ± 0%  +400.01%  (p=0.008 n=5+5)
RealDataFastOr/dimension_003-32             1.28MB ± 0%    5.74MB ± 0%  +349.78%  (p=0.008 n=5+5)
RealDataFastOr/dimension_008-32              162kB ± 0%     470kB ± 0%  +190.68%  (p=0.008 n=5+5)
RealDataFastOr/dimension_033-32             1.28MB ± 0%    5.11MB ± 0%  +300.59%  (p=0.008 n=5+5)
RealDataFastOr/uscensus2000-32               240kB ± 0%     927kB ± 0%  +286.56%  (p=0.008 n=5+5)
RealDataFastOr/weather_sept_85_srt-32        293kB ± 0%    1463kB ± 0%  +400.04%  (p=0.008 n=5+5)
RealDataFastOr/weather_sept_85-32            292kB ± 0%    1463kB ± 0%  +400.04%  (p=0.008 n=5+5)
RealDataFastOr/wikileaks-noquotes_srt-32     587kB ± 0%    1758kB ± 0%  +199.21%  (p=0.008 n=5+5)
RealDataFastOr/wikileaks-noquotes-32         587kB ± 0%    2362kB ± 0%  +302.08%  (p=0.008 n=5+5)

name                                      old allocs/op  new allocs/op  delta
RealDataFastOr/census-income_srt-32           9.00 ± 0%     50.00 ± 0%  +455.56%  (p=0.008 n=5+5)
RealDataFastOr/census-income-32               9.00 ± 0%     50.00 ± 0%  +455.56%  (p=0.008 n=5+5)
RealDataFastOr/census1881_srt-32              27.0 ± 0%     135.0 ± 0%  +400.00%  (p=0.008 n=5+5)
RealDataFastOr/census1881-32                  27.0 ± 0%     141.4 ± 0%  +423.70%  (p=0.008 n=5+5)
RealDataFastOr/dimension_003-32               25.6 ± 2%     124.6 ± 0%  +386.72%  (p=0.008 n=5+5)
RealDataFastOr/dimension_008-32               22.6 ± 3%     103.6 ± 1%  +358.41%  (p=0.008 n=5+5)
RealDataFastOr/dimension_033-32               26.0 ± 0%     130.0 ± 0%  +400.00%  (p=0.016 n=5+4)
RealDataFastOr/uscensus2000-32                54.6 ± 1%     230.0 ± 0%  +321.25%  (p=0.016 n=5+4)
RealDataFastOr/weather_sept_85_srt-32         14.0 ± 0%      79.0 ± 0%  +464.29%  (p=0.008 n=5+5)
RealDataFastOr/weather_sept_85-32             14.0 ± 0%      79.0 ± 0%  +464.29%  (p=0.008 n=5+5)
RealDataFastOr/wikileaks-noquotes_srt-32      16.0 ± 0%      82.0 ± 0%  +412.50%  (p=0.008 n=5+5)
RealDataFastOr/wikileaks-noquotes-32          16.0 ± 0%      84.0 ± 0%  +425.00%  (p=0.016 n=5+4)

This change is Reviewable

@manishrjain manishrjain merged commit 82459a2 into main May 14, 2021
@manishrjain manishrjain deleted the mrjn/conc branch May 14, 2021 02:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant