Skip to content

Optimise bounds checking for memory and tables #38

@SimonJF

Description

@SimonJF

Currently, memory (and soon tables) require explicit bounds checks to ensure safety. This incurs an additional read, and certainly additional branches.

One technique to reduce this would be to use mmap to ensure that out-of-bounds accesses cause a segmentation fault, and then handle the segmentation fault by trapping. Thus, the assumption is that the memory access will succeed, but that there's a guarantee that a segfault will be raised on out-of-bounds accesses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    optimisationsomething that needs doing for performance

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions