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

[DMS-68] Move leaf branch to the end of switch expression, as the most unlikely (Second attempt) #24

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

s-and-witch
Copy link
Collaborator

@s-and-witch s-and-witch commented Oct 15, 2024

This PR didn't touch folds and map as benchmark showed us that it performs worse (See #23).

In comparison with #20.

Map comparison

binary_size generate max mem batch_get 50 batch_put 50 batch_remove 50
persistentmap_100 187_090 201_602 42_600 51_044 122_234 124_817
persistentmap_baseline_100 187_086 205_152 42_600 53_474 124_854 127_364
persistentmap_1000 187_090 2_724_937 568_248 68_227 160_005 168_031
persistentmap_baseline_1000 187_086 2_793_387 568_248 72_497 164_285 172_045
persistentmap_10000 187_090 45_412_473 480_360 84_528 195_152 214_853
persistentmap_baseline_10000 187_086 46_447_443 480_360 90_438 201_072 220_280
persistentmap_100000 187_090 531_616_890 4_800_360 98_864 233_003 258_058
persistentmap_baseline_100000 187_086 545_438_270 4_800_360 106_504 240_673 265_060
persistentmap_1000000 187_090 6_080_971_407 48_000_396 117_446 271_877 307_984
persistentmap_baseline_1000000 187_086 6_253_448_857 48_000_396 126_976 281_287 316_543

Persistent map API

size foldLeft foldRight mapfilter map
persistentmap 100 19_787 19_699 89_105 29_538
persistentmap_baseline 100 19_787 19_699 90_455 29_538
persistentmap 1000 167_597 166_109 1_549_566 263_679
persistentmap_baseline 1000 167_597 166_109 1_589_456 263_679
persistentmap 10000 1_648_003 1_629_731 32_416_330 2_600_540
persistentmap_baseline 10000 1_648_003 1_629_731 33_082_790 2_600_540
persistentmap 100000 16_454_053 16_259_653 384_771_808 129_765_701
persistentmap_baseline 100000 16_454_053 16_259_653 393_979_788 129_765_701
persistentmap 1000000 164_559_185 162_575_473 4_435_968_960 1_297_599_225
persistentmap_baseline 1000000 164_559_185 162_575_473 4_552_839_930 1_297_599_225

In comparison with milestone-1

Map comparison

binary_size generate max mem batch_get 50 batch_put 50 batch_remove 50 upgrade
persistentmap_100 187_090 201_602 42_600 51_044 122_234 124_817 440_282
persistentmap_baseline_100 191_689 226_832 45_672 49_945 139_070 134_191 512_457
rbtree_100 189_877 225_155 42_540 50_045 135_367 133_686 565_657
persistentmap_1000 187_090 2_724_937 568_248 68_227 160_005 168_031 4_153_206
persistentmap_baseline_1000 191_689 3_133_922 612_880 67_416 184_117 181_732 4_878_488
rbtree_1000 189_877 3_118_490 580_948 67_516 181_375 180_396 5_409_805
persistentmap_10000 187_090 45_412_473 480_360 84_528 195_152 214_853 41_210_098
persistentmap_baseline_10000 191_689 51_438_500 520_360 83_365 227_294 231_116 48_561_107
rbtree_10000 189_877 51_301_049 520_428 83_465 224_135 230_257 53_866_589
persistentmap_100000 187_090 531_616_890 4_800_360 98_864 233_003 258_058 542_245_665
persistentmap_baseline_100000 191_689 608_157_242 5_200_360 97_912 273_597 277_661 645_876_276
rbtree_100000 189_877 606_914_881 5_200_428 98_012 270_465 276_802 698_928_540
persistentmap_1000000 187_090 6_080_971_407 48_000_396 117_446 271_877 307_984 5_422_489_439
persistentmap_baseline_1000000 191_689 7_005_190_168 52_000_396 116_317 320_359 331_196 6_458_379_331
rbtree_1000000 189_877 6_993_676_959 52_000_464 116_417 317_299 330_296 6_988_883_198

Persistent map API

size foldLeft foldRight mapfilter map
persistentmap 100 19_787 20_719 89_105 29_538
persistentmap_baseline 100 92_138 93_745 169_663 29_048
persistentmap 1000 167_597 176_129 1_549_566 263_679
persistentmap_baseline 1000 888_169 899_681 3_556_717 257_766
persistentmap 10000 1_648_003 1_729_751 32_416_330 2_600_540
persistentmap_baseline 10000 19_529_035 19_640_763 43_314_564 2_544_359
persistentmap 100000 16_454_053 17_259_673 384_771_808 129_765_701
persistentmap_baseline 100000 195_212_923 196_318_318 505_815_170 132_210_500
persistentmap 1000000 164_559_185 172_575_493 4_435_968_960 1_297_599_225
persistentmap_baseline 1000000 1_952_082_879 1_963_098_142 5_763_869_513 1_322_035_748

@s-and-witch s-and-witch force-pushed the wip/s-and-witch/reorder-some-branches branch from f81ec4f to 5053214 Compare October 15, 2024 14:15
This PR didn't touch folds and map as benchmark showed us
that it performs worse.
@s-and-witch s-and-witch force-pushed the wip/s-and-witch/reorder-some-branches branch from 5053214 to 86b876f Compare October 15, 2024 14:16
@s-and-witch s-and-witch merged commit d364a94 into milestone-2 Oct 16, 2024
8 checks passed
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.

1 participant