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

enforce usage of constants instead of constructing decimals on the spot? #18

Open
Patashu opened this issue Mar 15, 2019 · 2 comments
Open
Labels
is this optimal? possible performance improvements

Comments

@Patashu
Copy link
Owner

Patashu commented Mar 15, 2019

pros: less object construction/destruction.

cons: decimals aren't immutable, so someone could accidentally change the value of 0 and break everything.

so the time/memory savings would have to outweigh the threat of destruction.

@Patashu Patashu added the is this optimal? possible performance improvements label Mar 15, 2019
@Patashu
Copy link
Owner Author

Patashu commented Mar 18, 2019

Oh, that sounds very useful...

@Patashu Patashu changed the title use constants for -1, 0, 1, 10? use constants for -1, 0, 1, 10? (UPDATE: constants added but not enforced) Apr 2, 2019
@Patashu Patashu changed the title use constants for -1, 0, 1, 10? (UPDATE: constants added but not enforced) enforce usage of constants instead of constructing decimals on the spot? Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is this optimal? possible performance improvements
Projects
None yet
Development

No branches or pull requests

2 participants