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

Memoization #1

Merged
merged 1 commit into from
Jul 28, 2023
Merged

Memoization #1

merged 1 commit into from
Jul 28, 2023

Conversation

noahbaculi
Copy link
Owner

@noahbaculi noahbaculi commented Jul 28, 2023

Benchmarking

Definitions

  • The normal benchmark is from commit SHA 234448131310e31d33ed4af31ffe46813ba5044c.
  • The Memoized benchmark is from commit SHA aee0d75920e1c10108a0e9e81b76823454fdcf77.
cargo run --release --example basic

Single Arrangement with simple input

Normal Memoized Perc Δ
1st call runtime 3.15 ms 1.24 ms 60.63%
Subsequent call runtime 2.97 ms 43.40 µs 98.54%
Perc Δ 5.71% 96.50%

Single Arrangement with "Fur Elise" input

Normal Memoized Perc Δ
1st call runtime 35.74 ms 13.54 ms 62.11%
Subsequent call runtime 30.22 ms 238.40 µs 99.21%
Perc Δ 15.44% 98.23%

Single Arrangement with "Fur Elise" input × 10

Normal Memoized Perc Δ
1st call runtime 1.28 s 1.15 s 10.16%
Subsequent call runtime 1.24 s 2.38 ms 99.81%
Perc Δ 3.13% 99.79%

Single Arrangement with "Fur Elise" input × 20

Normal Memoized Perc Δ
1st call runtime 4.61 s 4.41 s 4.34%
Subsequent call runtime 4.44 s 2.97 ms 99.93%
Perc Δ 3.69% 99.93%

5 Arrangements with "Fur Elise" input

Normal Memoized Perc Δ
1st call runtime 509.66 ms 507.08 ms 0.51%
Subsequent call runtime 471.14 ms 584.90 µs 99.95%
Perc Δ 7.56% 99.88%

@noahbaculi noahbaculi merged commit 9fa9d8c into main Jul 28, 2023
7 checks passed
@noahbaculi noahbaculi deleted the memoization branch July 30, 2023 03:40
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