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

Only bother calculating AMSE when it's required #24

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

sd2k
Copy link
Collaborator

@sd2k sd2k commented Jun 21, 2023

The AMSE calculation is a fairly significant chunk of
the hot etscalc loop but it's just discarded for most
calls; we only need it when actually using the AMSE values.
By only calculating it when actually required we can speed up the
overall fit process by around 20-25%.

The AMSE calculation is a fairly significant chunk of
the hot etscalc loop but it's just discarded for most
calls; we only need it when actually using the AMSE values.
By only calculating it when actually required we can speed up the
overall fit process by around 20-25%.
@sd2k
Copy link
Collaborator Author

sd2k commented Jun 21, 2023

/ci benchmark

@github-actions
Copy link
Contributor

Benchmarks


Current:

fit
  Instructions:             8300423 (No change)
  L1 Accesses:             11277716 (No change)
  L2 Accesses:                  135 (No change)
  RAM Accesses:                 869 (No change)
  Estimated Cycles:        11308806 (No change)

auto_fit
  Instructions:            37198148 (No change)
  L1 Accesses:             50396663 (No change)
  L2 Accesses:                 2737 (No change)
  RAM Accesses:                1071 (No change)
  Estimated Cycles:        50447833 (No change)

bench_vic_elec_fit
  Instructions:           504547097 (+0.000003%)
  L1 Accesses:            561608919 (+0.000003%)
  L2 Accesses:               117869 (No change)
  RAM Accesses:               10080 (No change)
  Estimated Cycles:       562551064 (+0.000003%)


Previous:

fit
  Instructions:             8300423
  L1 Accesses:             11277716
  L2 Accesses:                  135
  RAM Accesses:                 869
  Estimated Cycles:        11308806

auto_fit
  Instructions:            37198148
  L1 Accesses:             50396663
  L2 Accesses:                 2737
  RAM Accesses:                1071
  Estimated Cycles:        50447833

bench_vic_elec_fit
  Instructions:           504547083
  L1 Accesses:            561608904
  L2 Accesses:               117869
  RAM Accesses:               10080
  Estimated Cycles:       562551049


@sd2k sd2k merged commit dafd94e into main Jun 21, 2023
@sd2k sd2k deleted the avoid-unnecessary-amse-calc branch June 21, 2023 08:21
@github-actions github-actions bot mentioned this pull request Sep 8, 2023
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