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

Major code cleanup required! #1

Open
nathanjhood opened this issue May 19, 2022 · 0 comments
Open

Major code cleanup required! #1

nathanjhood opened this issue May 19, 2022 · 0 comments

Comments

@nathanjhood
Copy link
Owner

The entire calculation and conversion of GUI parameters -> Processor parameters is very poorly coded, being taken almost line for line from a Matlab library (link in Readme credits).

Issues:

  • Very heavy amount of memory allocations
  • Indeterminate initialization order of the above
  • Near impossible to debug any numbers due to long strings of calculations in places...
  • Order of operations not respected at all (for seemingly any platform) in original codebase. Output is correct, at least!

Suggestions:

  • Re-create the parameter calculations in another workbench with easier/instantaneous debugging capabilities to validate the actual order of operations
  • Once the above is known, the various calculations may be broken out into separate functions and methods (for example; "DCBA()", "Numerator()", "Denominator()" etc...)
  • Calculations which are repeated very often (for example, "abs(a/b)") may also be split into small functions that simply return the input value with the algorithm applied, thus saving memory allocations in doing so (keep in mind that "return" may make a copy, research needed)
  • Once all of the above is in place and the filter is operating correctly (i.e., the same behaviour as v1.0.3b), the operational numbers can be observed closer with a view to breaking down how the calculations are applied, and further filter types might be possible branching off from here.
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

No branches or pull requests

1 participant