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

Added new IGNORE constant #1018

Merged
merged 2 commits into from
Apr 8, 2024
Merged

Added new IGNORE constant #1018

merged 2 commits into from
Apr 8, 2024

Conversation

jwoertink
Copy link
Member

@jwoertink jwoertink commented Mar 30, 2024

Fixes #1017

This PR adds a single Avram::Nothing.new instance assigned to a new constant called IGNORE. This does 2 things

  1. Uses a single allocated instance everywhere to represent Avram::Nothing instead of a new instance for every column. While this doesn't give a ton of memory savings, it's still better
  2. For those nasty overload errors, it shrinks them up by a few characters.

Before:
image

After:
image

src/avram/nothing.cr Outdated Show resolved Hide resolved
Copy link
Contributor

@robacarp robacarp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@jwoertink jwoertink merged commit 87a1ef9 into main Apr 8, 2024
9 checks passed
@jwoertink jwoertink deleted the issues/1017 branch April 8, 2024 21:47
@jwoertink jwoertink changed the title Added new Undefined constant Added new IGNORE constant Apr 19, 2024
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.

Create a global constant to represent Avram::Nothing.new
2 participants