trixi-framework / trixi-framework/Trixi.jl

Taal: Should we use `@inbounds` + `@boundscheck` to increase standard performance?

Open
#210 5 comments 0 reactions 0 assignees View on GitHub
performance taal
Dominant language
Julia
Stars
731
Forks
166
Avg merge
2d 18h
Merged PRs (30d)
25

Description

I think we should have a discussion about our way of boundschecking in general. There are at least two possible ways:
1. Use more `@boundscheck` blocks and `@inbounds` afterwards to make the assumptions on bounds explicit and the code fast even if the users start Julia with default arguments. While debugging some code, we can start Julia with the flag `--check-bounds=yes` to override `@inbounds`.
2. Do not use `@boundscheck` or `@inbounds` at all. By default, Julia will check bounds on every access. Hence, users need to start Julia with `--check-bounds=no` (or `--check-bounds=0` in @sloede's custom build :wink:) - our status quo.

Personally, I favor the first option.

_Originally posted by @ranocha in https://github.com/trixi-framework/Trixi.jl/pull/203#discussion_r501812901_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.