Skip to content

zipper_algebra: further specialize grafting - #62

Open
marcin-rzeznicki wants to merge 1 commit into
masterfrom
algebra_grafts_optimization
Open

zipper_algebra: further specialize grafting#62
marcin-rzeznicki wants to merge 1 commit into
masterfrom
algebra_grafts_optimization

Conversation

@marcin-rzeznicki

Copy link
Copy Markdown
Collaborator

This leads to a few percent speed-up in the benchmarks. For instance, for symmetric difference simulation, before this we had:

ops               fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ xor                          │               │               │               │         │
├─ base_2b     84.04 ms      │ 85.36 ms      │ 84.28 ms      │ 84.47 ms      │ 5       │ 50
├─ base_4b     888.8 ms      │ 896.3 ms      │ 893.7 ms      │ 893 ms        │ 5       │ 50
├─ zipper2_2b  494.2 ms      │ 501 ms        │ 497.1 ms      │ 497.9 ms      │ 5       │ 50
├─ zipper2_4b  3.88 s        │ 3.897 s       │ 3.886 s       │ 3.887 s       │ 5       │ 50
├─ zipper4_2b  331.4 ms      │ 336.5 ms      │ 333 ms        │ 333.7 ms      │ 5       │ 50
╰─ zipper4_4b  2.4 s         │ 2.411 s       │ 2.403 s       │ 2.404 s       │ 5       │ 50

and now we have:

Timer precision: 33 ns
ops               fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ xor                          │               │               │               │         │
├─ base_2b     71.11 ms      │ 72.15 ms      │ 71.48 ms      │ 71.55 ms      │ 5       │ 50
├─ base_4b     838.6 ms      │ 858.7 ms      │ 840.8 ms      │ 844.1 ms      │ 5       │ 50
├─ zipper2_2b  308.1 ms      │ 312.8 ms      │ 310.3 ms      │ 310.2 ms      │ 5       │ 50
├─ zipper2_4b  2.625 s       │ 2.65 s        │ 2.635 s       │ 2.636 s       │ 5       │ 50
├─ zipper4_2b  158.1 ms      │ 159.3 ms      │ 158.7 ms      │ 158.7 ms      │ 5       │ 50
╰─ zipper4_4b  1.603 s       │ 1.617 s       │ 1.615 s       │ 1.612 s       │ 5       │ 50

so there is a quite considerable speed-up (especially for longer paths)

This leads to a few percent speed-up in the benchmarks
@adamv-symbolica

Copy link
Copy Markdown

Let's fold do-graft optimization into the masked version @marcin-rzeznicki

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