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

Change to int as a default data type for bits #4

Open
gnypit opened this issue May 24, 2024 · 0 comments
Open

Change to int as a default data type for bits #4

gnypit opened this issue May 24, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@gnypit
Copy link
Owner

gnypit commented May 24, 2024

Storing a zero as an int uses less memory compared to storing it as a str. This is because the string object has additional overhead for managing character data and string-specific metadata. Therefore, if memory efficiency is a concern, it is generally better to store numeric values as integers rather than strings.

The str approach to bits will be reserved for output purposes in the demonstrator alone. It doesn't change the fact, that wherever possible we still prefer dicts to lists, for better quality with multiple callable elements.

@gnypit gnypit self-assigned this May 24, 2024
@gnypit gnypit added enhancement New feature or request good first issue Good for newcomers labels May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant