ADR Suggestion, Input check in setters and flag for skipping checks for performance #17
damskii9992
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
General
Adding checks for user inputs, and raising appropriate errors with useful error messages on wrong inputs, makes our libraries more user friendly for new users. Checks can slow down performance-sensitive code, so in order to avoid that issue we can have a global flag that skips all checks when set.
Current implementation
Currently, user input checks are made sporadically in our code and with no capability to skip them
Proposed implementation
An example of a setter with checks and a flag to skip them:
where UNSAFE is a global boolean which can, for example, be set by our calculators and minimizers.
Beta Was this translation helpful? Give feedback.
All reactions