If your function has as input arguments those constants (declared as constants or any other way) they will be performant. What you have to avoid is having parameters inside your function which are global variables.
lmiq
21
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Passing constant configuration values to modules | 7 | 1843 | January 28, 2021 | |
| "`const static`" function parameters | 31 | 4549 | November 9, 2017 | |
| Passing Constants into Functions as local variables vs default parameters or global constants | 7 | 185 | November 3, 2024 | |
| Efficiently passing a set of constants to a function | 21 | 2708 | July 8, 2022 | |
| Define a Julia function | 10 | 854 | February 9, 2022 |