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

refactor: create TRUE and FALSE constants #47

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Conversation

aesterline
Copy link
Member

Value::Bool can only have two values, so let's create constants for them so that we don't have to allocate a fresh Value everytime a bool is needed.

On a 100MB file it saves about 300MB of memory.

`Value::Bool` can only have two values, so let's create constants for
them so that we don't have to allocate a fresh `Value` everytime a bool
is needed.

On a 100MB file it saves about 300MB of memory.
@aesterline aesterline merged commit 9774b91 into main Jun 26, 2024
5 checks passed
@aesterline aesterline deleted the bool-constants branch June 26, 2024 00:37
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

Successfully merging this pull request may close these issues.

2 participants