Skip to content

Experiment with removing unsafe slice indexing #135

Description

@hsivonen

Back when I made some slice indexing use unsafe, the compiler wasn't able to elide the bound checks on its own. However, when I made utf8_iter and pasted code into Compiler Explorer, I noticed that the compiler had learned to elide the bound checks.

Experiment with which instances of unsafe manual bound check elision would now work as safe code without a performance penalty.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions