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

Add modular operators +% -% >>% etc. #408

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jan 9, 2024

  1. Add modular operators +% -% >>% etc.

    For the last ten years, there have been idle discussion about allowing a way for
    users to opt-in for explicitly overflowing integer operations.
    Julia's arithmetic operations do overflow by default, but it may in the future be
    possible to run Julia in a mode where overflows are detected, for testing
    purposes. If this is to be done, then there needs to be a way to signal that the
    user explicitly wants overflow, which is important in some low-level operations,
    such as hashing.
    For bitshifting, Julias definition of e.g. >> checks for overflow, which leads
    to suboptimal code. Analogous to the opt-in overflowing arithmetic ops like +%,
    users ought to be able to opt-in to the more efficient overflowing shifts, which
    in situations where bitshifts are a performance bottleneck.
    jakobnissen committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    bb44ed4 View commit details
    Browse the repository at this point in the history