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

Simplify and optimize Util.falsey? #24

Merged
merged 1 commit into from
Jul 7, 2016

Commits on Apr 15, 2016

  1. Simplify and optimize Util.falsey?

    The two first cases (nil and false) are equivalent to !value, the three following (String, Hash, Array) are covered by #empty? and the last case (Struct) can use #any?
    
    These optimizations aren't huge in terms of operations per second, but they avoid allocating strings, arrays and hashes, which means that the GC will have to work less, leading to better overall performance.
    iconara committed Apr 15, 2016
    Configuration menu
    Copy the full SHA
    e3479a7 View commit details
    Browse the repository at this point in the history