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

Simplify the EFM decoder logic #770

Merged
merged 2 commits into from
Aug 20, 2022
Merged

Commits on Aug 12, 2022

  1. Simplify the logic in translateEfm.

    Breaking out of the linear search when you find a match speeds this up
    by about 5% (mostly from the first loop, since that handles 99.999% of
    the values on a good disc).
    atsampson committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    44bed5b View commit details
    Browse the repository at this point in the history
  2. Simplify the EFM correction table.

    Since it contains an entry for every possible EFM code (with no
    duplicates), it can be stored as a single array with the EFM code as the
    index, avoiding the linear search.
    
    (It's still quicker to use the linear search for the correct codes,
    since the 512-byte lookup table fits in L1 cache; going straight to a
    32+ KiB lookup table is much slower.)
    atsampson committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    7068736 View commit details
    Browse the repository at this point in the history