Skip to content

Infinity and NaN are not optimized #2934

@anonyco

Description

@anonyco

Infinity and -Infinity can be optimized into 1/0 and -1/0 respectively. NaN can be optimized into 0/0. While there is no size benefit to optimizing NaN, there is a performance benefit. NaN is a window property. As such, using NaN forces the browser to add in extra checks incaseif window.NaN is changed by some oafish moron as per the W3 spec which (unfourtunatly) permits the free roam of such idiots.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions