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

Inline the common case of balance functions #1056

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

meooow25
Copy link
Contributor

Closes #1053

Benchmarks, using GHC 9.10.1:

Set:

Name                           Time - - - - - - - -    Allocated - - - - -
                                    A       B     %         A       B     %
alterF:delete                  412 μs  249 μs  -39%    1.9 MB  1.9 MB   +0%
alterF:four                    806 μs  621 μs  -23%    2.9 MB  2.9 MB   +0%
alterF:four:strings            1.4 ms  1.2 ms  -19%    3.0 MB  3.0 MB   +0%
alterF:insert                  638 μs  433 μs  -32%    3.6 MB  3.6 MB   +0%
alterF:member                  655 μs  457 μs  -30%    2.4 MB  2.4 MB   +0%
alterF_naive:four              1.1 ms  936 μs  -14%    2.0 MB  2.0 MB   +0%
alterF_naive:four:strings      2.9 ms  2.8 ms   -2%    2.1 MB  2.1 MB   +0%
compare                         31 μs   31 μs   -1%    128 KB  128 KB   +0%
delete                         380 μs  219 μs  -42%    1.3 MB  1.3 MB   +0%
delete random                  784 μs  610 μs  -22%    1.5 MB  1.5 MB   +0%
deleteMax                       94 ns   46 ns  -50%    511 B   511 B    +0%
deleteMin                       89 ns   44 ns  -50%    471 B   471 B    +0%
difference                      81 μs   69 μs  -14%    239 KB  239 KB   +0%
disjoint:false                  20 ns   20 ns   +0%     23 B    23 B    +0%
disjoint:true                  107 μs  102 μs   -4%    218 KB  218 KB   +0%
eq                              31 μs   31 μs   +0%    128 KB  128 KB   +0%
filter                          56 μs   55 μs   -2%     80 KB   80 KB   +0%
findMax                         15 ns   15 ns   +0%     31 B    31 B    +0%
findMin                         14 ns   14 ns   +0%     31 B    31 B    +0%
fromAscList                     51 μs   64 μs  +26%    240 KB  238 KB   +0%
fromDescList                    48 μs   50 μs   +3%    240 KB  240 KB   +0%
fromDistinctAscList             22 μs   22 μs   -3%    223 KB  223 KB   +0%
fromDistinctAscList:fusion      18 μs   18 μs   -2%    288 KB  288 KB   +0%
fromDistinctDescList            22 μs   21 μs   -2%    223 KB  223 KB   +0%
fromDistinctDescList:fusion     18 μs   18 μs   -2%    288 KB  288 KB   +0%
fromList                        52 μs   49 μs   -6%    271 KB  271 KB   +0%
fromList-desc                  467 μs  265 μs  -43%    2.0 MB  2.0 MB   +1%
insert                         600 μs  390 μs  -35%    2.6 MB  2.6 MB   +0%
insert random                  834 μs  643 μs  -22%    1.9 MB  1.9 MB   +0%
intersection                    35 μs   36 μs   +1%     80 KB   80 KB   +0%
map                             89 μs   88 μs   -1%    559 KB  559 KB   +0%
member                         146 μs  145 μs   +0%      0 B     0 B
member.powerSet (14)            12 ms   12 ms   +1%     32 MB   32 MB   +0%
member.powerSet (15)            27 ms   28 ms   +1%     73 MB   73 MB   +0%
null.intersection:false         35 μs   36 μs   +1%     80 KB   80 KB   +0%
null.intersection:true         101 μs   95 μs   -5%    298 KB  298 KB   +0%
partition                      114 μs  101 μs  -11%    239 KB  239 KB   +0%
powerSet (15)                  8.1 ms  7.9 ms   -2%    7.5 MB  7.5 MB   +0%
powerSet (16)                   21 ms   21 ms   +0%     15 MB   15 MB   -2%
union                          108 μs  102 μs   -5%    472 KB  472 KB   +0%
unions                         107 μs  102 μs   -4%    472 KB  472 KB   +0%

Map:

Name                              Time - - - - - - - -    Allocated - - - - -
                                       A       B     %         A       B     %
<$                                 26 μs   25 μs   -1%    191 KB  191 KB   +0%
<$ really                          60 μs   59 μs   -1%    191 KB  191 KB   +0%
alter absent                      298 μs  220 μs  -26%    1.0 MB  1.0 MB   +0%
alter delete                      291 μs  216 μs  -25%    1.0 MB  1.0 MB   +0%
alter insert                      303 μs  222 μs  -26%    1.1 MB  1.1 MB   +0%
alter update                      243 μs  173 μs  -28%    985 KB  985 KB   +0%
alterF alter absent               172 μs  171 μs   +0%      0 B     0 B
alterF alter delete               338 μs  236 μs  -30%    1.3 MB  1.3 MB   +0%
alterF alter insert               358 μs  254 μs  -28%    1.5 MB  1.5 MB   +0%
alterF alter update               189 μs  185 μs   -2%    1.3 MB  1.3 MB   +0%
alterF delete absent              158 μs  157 μs   +0%      0 B     0 B
alterF delete present             322 μs  217 μs  -32%    1.3 MB  1.3 MB   +0%
alterF insert absent              360 μs  262 μs  -27%    1.6 MB  1.6 MB   +0%
alterF insert present             190 μs  185 μs   -2%    1.3 MB  1.3 MB   +0%
alterF lookup absent               80 μs   78 μs   -1%      0 B     0 B
alterF lookup present              65 μs   64 μs   -1%     32 KB   32 KB   +0%
alterF no rules alter absent       93 μs   91 μs   -1%      0 B     0 B
alterF no rules alter delete      357 μs  290 μs  -18%    1.0 MB  1.0 MB   +0%
alterF no rules alter insert      381 μs  306 μs  -19%    1.1 MB  1.1 MB   +0%
alterF no rules alter update      238 μs  234 μs   -1%    985 KB  985 KB   +0%
alterF no rules delete absent      90 μs   91 μs   +0%      0 B     0 B
alterF no rules delete present    353 μs  293 μs  -16%    1.0 MB  1.0 MB   +0%
alterF no rules insert absent     381 μs  310 μs  -18%    1.2 MB  1.2 MB   +0%
alterF no rules insert present    236 μs  239 μs   +0%    1.0 MB  1.0 MB   +0%
alterF no rules lookup absent      87 μs   86 μs   -1%      0 B     0 B
alterF no rules lookup present     73 μs   72 μs   -1%     32 KB   32 KB   +0%
compare                            41 μs   40 μs   -3%    159 KB  159 KB   +0%
delete                            358 μs  238 μs  -33%    1.6 MB  1.6 MB   +0%
delete absent                     155 μs  160 μs   +3%      0 B     0 B
delete present                    268 μs  206 μs  -23%    1.0 MB  1.0 MB   +0%
delete random                     776 μs  647 μs  -16%    1.8 MB  1.8 MB   +0%
difference                         77 μs   67 μs  -12%    287 KB  287 KB   +0%
eq                                 40 μs   42 μs   +6%    159 KB  159 KB   +0%
foldlWithKey                      489 μs  382 μs  -21%    1.9 MB  1.9 MB   +0%
foldlWithKey'                      13 μs   13 μs   +3%      0 B     0 B
foldrWithKey                       43 ns   44 ns   +1%    983 B   983 B    +0%
foldrWithKey'                      25 μs   25 μs   +0%    191 KB  191 KB   +0%
fromAscList                        53 μs   52 μs   +0%    481 KB  481 KB   +0%
fromAscListWithKey                 59 μs   59 μs   +0%    592 KB  592 KB   +0%
fromDescList                       51 μs   51 μs   +0%    481 KB  481 KB   +0%
fromDescListWithKey                59 μs   59 μs   +0%    589 KB  589 KB   +0%
fromDistinctAscList                27 μs   33 μs  +23%    272 KB  272 KB   +0%
fromDistinctAscList:fusion         21 μs   21 μs   +0%    336 KB  336 KB   +0%
fromDistinctDescList               26 μs   28 μs  +10%    272 KB  271 KB   +0%
fromDistinctDescList:fusion        21 μs   21 μs   +0%    336 KB  336 KB   +0%
fromList                           69 μs   66 μs   -4%    319 KB  319 KB   +0%
fromList-desc                     506 μs  324 μs  -36%    2.6 MB  2.6 MB   +0%
insert                            600 μs  440 μs  -26%    3.1 MB  3.1 MB   +0%
insert absent                     282 μs  220 μs  -21%    1.1 MB  1.1 MB   +0%
insert present                    215 μs  156 μs  -27%    899 KB  899 KB   +0%
insert random                     831 μs  674 μs  -18%    2.3 MB  2.3 MB   +0%
insertLookupWithKey absent        314 μs  255 μs  -19%    1.1 MB  1.1 MB   +0%
insertLookupWithKey present       258 μs  184 μs  -28%    1.0 MB  1.0 MB   +0%
insertLookupWithKey' absent       296 μs  228 μs  -23%    1.1 MB  1.1 MB   +0%
insertLookupWithKey' present      240 μs  169 μs  -29%    1.0 MB  1.0 MB   +0%
insertWith absent                 298 μs  226 μs  -24%    1.2 MB  1.2 MB   +0%
insertWith present                234 μs  170 μs  -27%    1.0 MB  1.0 MB   +0%
insertWith' absent                291 μs  211 μs  -27%    1.2 MB  1.2 MB   +0%
insertWith' present               228 μs  168 μs  -26%    1.0 MB  1.0 MB   +0%
insertWithKey absent              301 μs  227 μs  -24%    1.1 MB  1.1 MB   +0%
insertWithKey present             233 μs  168 μs  -27%    1.0 MB  1.0 MB   +0%
insertWithKey' absent             291 μs  208 μs  -28%    1.1 MB  1.1 MB   +0%
insertWithKey' present            226 μs  160 μs  -29%    985 KB  985 KB   +0%
intersection                       32 μs   31 μs   -1%     96 KB   96 KB   +0%
lookup absent                      79 μs   80 μs   +1%      0 B     0 B
lookup present                     64 μs   64 μs   +0%     32 KB   32 KB   +0%
lookupIndex                       158 μs  158 μs   +0%    128 KB  128 KB   +0%
map                                31 μs   31 μs   +0%    287 KB  287 KB   +0%
map really                         81 μs   82 μs   +1%    351 KB  351 KB   +0%
mapMaybe                           91 μs   87 μs   -4%    247 KB  247 KB   +0%
mapMaybeWithKey                    91 μs   87 μs   -4%    247 KB  247 KB   +0%
mapWithKey                         37 μs   37 μs   +1%    352 KB  352 KB   +0%
minView                            22 ns   18 ns  -16%    135 B   135 B    +0%
split                             9.0 ns  8.0 ns  -10%     47 B    47 B    +0%
union                             111 μs  105 μs   -5%    561 KB  566 KB   +0%
update absent                     271 μs  212 μs  -21%    1.0 MB  1.0 MB   +0%
update delete                     268 μs  207 μs  -22%    1.0 MB  1.0 MB   +0%
update present                    210 μs  155 μs  -26%    861 KB  861 KB   +0%
updateLookupWithKey absent        301 μs  212 μs  -29%    1.0 MB  1.0 MB   +0%
updateLookupWithKey delete        280 μs  197 μs  -29%    1.0 MB  1.0 MB   +0%
updateLookupWithKey present       230 μs  150 μs  -34%    893 KB  893 KB   +0%

Set operations, Set:

Name                                  Time - - - - - - - -    Allocated - - - - -
                                           A       B     %         A       B     %
difference-block_nn                   400 μs  389 μs   -2%    1.0 MB  1.0 MB   +0%
difference-block_nn_swap              403 μs  394 μs   -2%    1.0 MB  1.0 MB   +0%
difference-block_ns                    47 μs   45 μs   -4%    143 KB  143 KB   +0%
difference-block_sn_swap               47 μs   46 μs   -2%    135 KB  135 KB   +0%
difference-common_nn                  3.3 ms  2.8 ms  -12%    5.6 MB  5.6 MB   +0%
difference-common_nn_swap             588 μs  579 μs   -1%      0 B     0 B
difference-common_ns                  2.3 ms  2.0 ms  -14%    4.7 MB  4.7 MB   +0%
difference-common_nt                  128 μs  105 μs  -17%    334 KB  338 KB   +0%
difference-common_sn_swap             896 μs  876 μs   -2%    1.8 MB  1.8 MB   +0%
difference-common_tn_swap              76 μs   78 μs   +2%    123 KB  123 KB   +0%
difference-disj_nn                    3.2 μs  3.2 μs   +1%     11 KB   11 KB   +0%
difference-disj_nn_swap               2.7 μs  2.8 μs   +1%     11 KB   11 KB   +0%
difference-disj_ns                    2.4 μs  2.4 μs   +0%    8.3 KB  8.3 KB   +0%
difference-disj_nt                    1.5 μs  1.5 μs   -1%    5.1 KB  5.1 KB   +0%
difference-disj_sn_swap               2.2 μs  2.1 μs   +0%    8.1 KB  8.1 KB   +0%
difference-disj_tn_swap               1.5 μs  1.4 μs   +0%    5.0 KB  5.0 KB   +0%
difference-mix_nn                     5.8 ms  5.7 ms   -1%     14 MB   14 MB   +0%
difference-mix_nn_swap                5.7 ms  5.7 ms   +0%     14 MB   14 MB   +0%
difference-mix_ns                     1.3 ms  1.2 ms   -8%    3.8 MB  3.8 MB   +0%
difference-mix_nt                      91 μs   83 μs   -8%    239 KB  239 KB   +0%
difference-mix_sn_swap                1.3 ms  1.3 ms   +0%    2.7 MB  2.7 MB   +0%
difference-mix_tn_swap                 87 μs   87 μs   +0%    147 KB  147 KB   +0%
intersection-block_nn                 417 μs  409 μs   -1%    1.0 MB  1.0 MB   +0%
intersection-block_nn_swap            412 μs  411 μs   +0%    1.0 MB  1.0 MB   +0%
intersection-block_ns                  48 μs   48 μs   -1%    135 KB  135 KB   +0%
intersection-block_sn_swap             48 μs   47 μs   -2%    143 KB  143 KB   +0%
intersection-common_nn                1.1 ms  1.1 ms   +0%    1.9 MB  1.9 MB   -1%
intersection-common_nn_swap           535 μs  542 μs   +1%      0 B     0 B
intersection-common_ns                1.3 ms  1.2 ms   -4%    2.5 MB  2.5 MB   +0%
intersection-common_nt                 96 μs   95 μs   -1%    151 KB  151 KB   +0%
intersection-common_sn_swap           932 μs  827 μs  -11%    2.7 MB  2.7 MB   +0%
intersection-common_tn_swap            85 μs   80 μs   -6%    210 KB  210 KB   +0%
intersection-disj_nn                  2.8 μs  2.9 μs   +1%     11 KB   11 KB   +0%
intersection-disj_nn_swap             3.1 μs  3.2 μs   +1%     11 KB   11 KB   +0%
intersection-disj_ns                  2.3 μs  2.2 μs   -1%    8.1 KB  8.1 KB   +0%
intersection-disj_nt                  1.5 μs  1.5 μs   -1%    5.0 KB  5.0 KB   +0%
intersection-disj_sn_swap             2.4 μs  2.4 μs   -1%    8.3 KB  8.3 KB   +0%
intersection-disj_tn_swap             1.5 μs  1.5 μs   +1%    5.1 KB  5.1 KB   +0%
intersection-mix_nn                   5.5 ms  5.1 ms   -6%     14 MB   14 MB   +0%
intersection-mix_nn_swap              5.5 ms  5.2 ms   -5%     14 MB   14 MB   +0%
intersection-mix_ns                   1.3 ms  1.3 ms   -1%    2.7 MB  2.7 MB   +0%
intersection-mix_nt                    88 μs   88 μs   +0%    147 KB  147 KB   +0%
intersection-mix_sn_swap              1.3 ms  1.2 ms   -7%    3.8 MB  3.8 MB   +0%
intersection-mix_tn_swap               92 μs   84 μs   -9%    234 KB  234 KB   +0%
symmetricDifference-block_nn          605 μs  555 μs   -8%    1.6 MB  1.6 MB   +0%
symmetricDifference-block_nn_swap     595 μs  548 μs   -7%    1.6 MB  1.6 MB   +0%
symmetricDifference-block_ns           64 μs   59 μs   -7%    205 KB  202 KB   -1%
symmetricDifference-block_sn_swap      72 μs   62 μs  -14%    234 KB  236 KB   +1%
symmetricDifference-common_nn         2.4 ms  2.0 ms  -13%    3.7 MB  3.7 MB   +0%
symmetricDifference-common_nn_swap    2.4 ms  2.1 ms  -13%    3.8 MB  3.7 MB   -1%
symmetricDifference-common_ns         1.6 ms  1.5 ms   -3%    3.1 MB  3.1 MB   +0%
symmetricDifference-common_nt         111 μs  108 μs   -3%    231 KB  231 KB   +0%
symmetricDifference-common_sn_swap    2.2 ms  1.8 ms  -16%    4.3 MB  4.3 MB   +0%
symmetricDifference-common_tn_swap    127 μs  107 μs  -16%    326 KB  326 KB   +0%
symmetricDifference-disj_nn           4.5 μs  3.8 μs  -14%     18 KB   18 KB   +0%
symmetricDifference-disj_nn_swap      4.5 μs  4.0 μs  -11%     18 KB   18 KB   +0%
symmetricDifference-disj_ns           3.2 μs  2.8 μs  -12%     13 KB   13 KB   +0%
symmetricDifference-disj_nt           2.0 μs  1.8 μs   -9%    7.9 KB  7.9 KB   +0%
symmetricDifference-disj_sn_swap      3.7 μs  3.1 μs  -14%     14 KB   14 KB   +0%
symmetricDifference-disj_tn_swap      2.4 μs  2.0 μs  -16%    9.7 KB  9.8 KB   +0%
symmetricDifference-mix_nn             16 ms   16 ms   -2%     18 MB   18 MB   +0%
symmetricDifference-mix_nn_swap        17 ms   16 ms   -2%     18 MB   18 MB   +0%
symmetricDifference-mix_ns            2.4 ms  2.4 ms   +0%    4.6 MB  4.7 MB   +1%
symmetricDifference-mix_nt            112 μs  111 μs   +0%    271 KB  271 KB   +0%
symmetricDifference-mix_sn_swap       2.1 ms  2.0 ms   -7%    4.1 MB  4.2 MB   +1%
symmetricDifference-mix_tn_swap        97 μs   87 μs  -10%    250 KB  250 KB   +0%
union-block_nn                        568 μs  518 μs   -8%    1.6 MB  1.6 MB   +0%
union-block_nn_swap                   564 μs  508 μs   -9%    1.6 MB  1.6 MB   +0%
union-block_ns                         60 μs   55 μs   -8%    195 KB  195 KB   +0%
union-block_sn_swap                    67 μs   57 μs  -14%    223 KB  223 KB   +0%
union-common_nn                       390 μs  394 μs   +1%      0 B     0 B
union-common_nn_swap                  1.0 ms  1.0 ms   +0%    2.3 MB  2.3 MB   +0%
union-common_ns                       589 μs  573 μs   -2%    1.2 MB  1.2 MB   +0%
union-common_nt                        38 μs   37 μs   -2%     45 KB   45 KB   +0%
union-common_sn_swap                  1.3 ms  1.1 ms  -16%    2.9 MB  2.9 MB   +0%
union-common_tn_swap                   77 μs   65 μs  -15%    191 KB  192 KB   +0%
union-disj_nn                         4.3 μs  3.6 μs  -16%     17 KB   18 KB   +0%
union-disj_nn_swap                    4.3 μs  3.9 μs   -9%     17 KB   17 KB   +0%
union-disj_ns                         3.2 μs  2.7 μs  -13%     13 KB   13 KB   +0%
union-disj_nt                         2.0 μs  1.8 μs   -8%    7.5 KB  7.5 KB   +0%
union-disj_sn_swap                    3.5 μs  2.9 μs  -15%     14 KB   14 KB   +0%
union-disj_tn_swap                    2.2 μs  1.8 μs  -18%    9.1 KB  9.1 KB   +0%
union-mix_nn                           17 ms   17 ms   -3%     23 MB   23 MB   +0%
union-mix_nn_swap                      17 ms   17 ms   -1%     23 MB   23 MB   +0%
union-mix_ns                          1.5 ms  1.3 ms  -10%    3.4 MB  3.4 MB   +0%
union-mix_nt                           74 μs   61 μs  -17%    170 KB  171 KB   +0%
union-mix_sn_swap                     1.7 ms  1.5 ms   -8%    3.7 MB  3.7 MB   +0%
union-mix_tn_swap                      81 μs   70 μs  -13%    207 KB  207 KB   +0%

Set operations, Map:

Name                                  Time - - - - - - - -    Allocated - - - - -
                                           A       B     %         A       B     %
difference-block_nn                   397 μs  377 μs   -4%    1.2 MB  1.2 MB   +0%
difference-block_nn_swap              399 μs  381 μs   -4%    1.2 MB  1.2 MB   +0%
difference-block_ns                    46 μs   43 μs   -6%    171 KB  171 KB   +0%
difference-block_sn_swap               46 μs   44 μs   -3%    163 KB  163 KB   +0%
difference-common_nn                  3.9 ms  3.6 ms   -6%    6.8 MB  6.8 MB   +0%
difference-common_nn_swap             490 μs  483 μs   -1%      0 B     0 B
difference-common_ns                  3.0 ms  2.8 ms   -5%    5.6 MB  5.6 MB   +0%
difference-common_nt                  127 μs  107 μs  -15%    404 KB  406 KB   +0%
difference-common_sn_swap             856 μs  826 μs   -3%    2.1 MB  2.1 MB   +0%
difference-common_tn_swap              71 μs   70 μs   +0%    147 KB  147 KB   +0%
difference-disj_nn                    2.9 μs  2.8 μs   -1%     13 KB   13 KB   +0%
difference-disj_nn_swap               2.5 μs  2.4 μs   -5%     13 KB   13 KB   +0%
difference-disj_ns                    2.3 μs  2.1 μs   -5%     10 KB   10 KB   +0%
difference-disj_nt                    1.4 μs  1.3 μs   -5%    6.2 KB  6.2 KB   +0%
difference-disj_sn_swap               1.9 μs  1.9 μs   -2%    9.7 KB  9.7 KB   +0%
difference-disj_tn_swap               1.3 μs  1.3 μs   -2%    6.0 KB  6.0 KB   +0%
difference-mix_nn                     6.9 ms  6.5 ms   -5%     17 MB   17 MB   +0%
difference-mix_nn_swap                6.8 ms  6.7 ms   -2%     17 MB   17 MB   +0%
difference-mix_ns                     1.3 ms  1.2 ms   -2%    4.6 MB  4.6 MB   +0%
difference-mix_nt                      91 μs   86 μs   -5%    286 KB  286 KB   +0%
difference-mix_sn_swap                1.2 ms  1.2 ms   +2%    3.2 MB  3.2 MB   +0%
difference-mix_tn_swap                 80 μs   78 μs   -2%    175 KB  175 KB   +0%
intersection-block_nn                 402 μs  393 μs   -2%    1.2 MB  1.2 MB   +0%
intersection-block_nn_swap            400 μs  386 μs   -3%    1.2 MB  1.2 MB   +0%
intersection-block_ns                  46 μs   46 μs   +0%    163 KB  163 KB   +0%
intersection-block_sn_swap             45 μs   45 μs   -1%    171 KB  171 KB   +0%
intersection-common_nn                1.2 ms  1.3 ms   +5%    2.3 MB  2.2 MB   -1%
intersection-common_nn_swap           470 μs  483 μs   +2%      0 B     0 B
intersection-common_ns                1.3 ms  1.3 ms   -1%    3.0 MB  3.0 MB   +0%
intersection-common_nt                 92 μs   91 μs   -1%    183 KB  183 KB   +0%
intersection-common_sn_swap           949 μs  884 μs   -6%    3.2 MB  3.2 MB   +0%
intersection-common_tn_swap            84 μs   75 μs  -10%    255 KB  256 KB   +0%
intersection-disj_nn                  2.4 μs  2.4 μs   -1%     13 KB   13 KB   +0%
intersection-disj_nn_swap             2.9 μs  2.8 μs   -2%     13 KB   13 KB   +0%
intersection-disj_ns                  2.0 μs  1.9 μs   -1%    9.7 KB  9.7 KB   +0%
intersection-disj_nt                  1.4 μs  1.4 μs   +0%    6.0 KB  6.0 KB   +0%
intersection-disj_sn_swap             2.2 μs  2.1 μs   -1%     10 KB   10 KB   +0%
intersection-disj_tn_swap             1.4 μs  1.3 μs   -2%    6.2 KB  6.2 KB   +0%
intersection-mix_nn                   6.0 ms  5.7 ms   -4%     17 MB   17 MB   +0%
intersection-mix_nn_swap              5.9 ms  5.8 ms   -1%     17 MB   17 MB   +0%
intersection-mix_ns                   1.3 ms  1.3 ms   -2%    3.2 MB  3.2 MB   +0%
intersection-mix_nt                    87 μs   85 μs   -1%    175 KB  175 KB   +0%
intersection-mix_sn_swap              1.3 ms  1.2 ms   -8%    4.5 MB  4.6 MB   +0%
intersection-mix_tn_swap               94 μs   86 μs   -9%    284 KB  284 KB   +0%
symmetricDifference-block_nn          576 μs  528 μs   -8%    2.0 MB  2.0 MB   +0%
symmetricDifference-block_nn_swap     576 μs  533 μs   -7%    2.0 MB  2.0 MB   +0%
symmetricDifference-block_ns           63 μs   58 μs   -7%    244 KB  242 KB   +0%
symmetricDifference-block_sn_swap      70 μs   61 μs  -12%    282 KB  282 KB   +0%
symmetricDifference-common_nn         2.9 ms  2.7 ms   -5%    4.5 MB  4.5 MB   +0%
symmetricDifference-common_nn_swap    2.9 ms  2.6 ms  -10%    4.5 MB  4.5 MB   +0%
symmetricDifference-common_ns         1.7 ms  1.7 ms   -3%    3.8 MB  3.8 MB   +0%
symmetricDifference-common_nt         108 μs  105 μs   -2%    274 KB  274 KB   +0%
symmetricDifference-common_sn_swap    2.8 ms  2.5 ms  -10%    5.1 MB  5.2 MB   +0%
symmetricDifference-common_tn_swap    131 μs  108 μs  -17%    390 KB  390 KB   +0%
symmetricDifference-disj_nn           4.3 μs  3.6 μs  -15%     22 KB   22 KB   +0%
symmetricDifference-disj_nn_swap      4.4 μs  3.8 μs  -14%     21 KB   21 KB   +0%
symmetricDifference-disj_ns           3.1 μs  2.6 μs  -15%     16 KB   16 KB   +0%
symmetricDifference-disj_nt           2.0 μs  1.8 μs   -9%    9.4 KB  9.4 KB   +0%
symmetricDifference-disj_sn_swap      3.6 μs  3.0 μs  -15%     17 KB   17 KB   +0%
symmetricDifference-disj_tn_swap      2.4 μs  2.0 μs  -18%     12 KB   12 KB   +0%
symmetricDifference-mix_nn             19 ms   18 ms   -1%     22 MB   22 MB   +0%
symmetricDifference-mix_nn_swap        19 ms   18 ms   -1%     22 MB   22 MB   +0%
symmetricDifference-mix_ns            3.0 ms  3.0 ms   +0%    5.6 MB  5.6 MB   +0%
symmetricDifference-mix_nt            114 μs  112 μs   -1%    325 KB  327 KB   +0%
symmetricDifference-mix_sn_swap       3.0 ms  2.9 ms   -4%    5.0 MB  5.0 MB   +0%
symmetricDifference-mix_tn_swap        97 μs   90 μs   -7%    298 KB  298 KB   +0%
union-block_nn                        594 μs  531 μs  -10%    1.9 MB  1.9 MB   +0%
union-block_nn_swap                   589 μs  519 μs  -12%    1.9 MB  1.9 MB   +0%
union-block_ns                         62 μs   55 μs  -11%    234 KB  235 KB   +0%
union-block_sn_swap                    68 μs   57 μs  -15%    266 KB  266 KB   +0%
union-common_nn                       368 μs  362 μs   -1%      0 B     0 B
union-common_nn_swap                  1.1 ms  1.1 ms   +0%    2.3 MB  2.3 MB   +0%
union-common_ns                       609 μs  568 μs   -6%    1.5 MB  1.5 MB   +0%
union-common_nt                        41 μs   38 μs   -7%     56 KB   56 KB   +0%
union-common_sn_swap                  1.5 ms  1.4 ms   -3%    3.5 MB  3.5 MB   +0%
union-common_tn_swap                   76 μs   68 μs  -11%    231 KB  231 KB   +0%
union-disj_nn                         4.0 μs  3.4 μs  -15%     21 KB   21 KB   +0%
union-disj_nn_swap                    4.2 μs  3.7 μs  -12%     21 KB   21 KB   +0%
union-disj_ns                         3.0 μs  2.5 μs  -16%     15 KB   15 KB   +0%
union-disj_nt                         1.9 μs  1.8 μs   -9%    9.1 KB  9.1 KB   +0%
union-disj_sn_swap                    3.4 μs  2.9 μs  -13%     17 KB   17 KB   +0%
union-disj_tn_swap                    2.2 μs  1.8 μs  -18%     11 KB   11 KB   +0%
union-mix_nn                           20 ms   20 ms   -1%     27 MB   27 MB   +0%
union-mix_nn_swap                      21 ms   21 ms   +0%     27 MB   27 MB   +0%
union-mix_ns                          1.9 ms  1.7 ms   -7%    4.1 MB  4.1 MB   +0%
union-mix_nt                           77 μs   63 μs  -18%    207 KB  207 KB   +0%
union-mix_sn_swap                     2.3 ms  2.2 ms   -5%    4.4 MB  4.4 MB   +0%
union-mix_tn_swap                      85 μs   73 μs  -14%    247 KB  247 KB   +0%

@meooow25 meooow25 mentioned this pull request Oct 31, 2024
9 tasks
@meooow25 meooow25 requested a review from treeowl November 17, 2024 14:01
@meooow25
Copy link
Contributor Author

@treeowl would you like to take a look at this?

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.

Make Set/Map balance calls faster
1 participant