You will reach a performance penalty if the number of types increase, which can be dealt with manual splitting. There are some threads discussing that, and solutions, for example:
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Article about Multiple Dispatch | 7 | 2067 | August 12, 2022 | |
| If mutiple dispatch is done at compile time, wouldn't that make things faster? | 3 | 542 | May 23, 2022 | |
| Ask for advise : Multiple dispatch vs branching performance | 7 | 393 | January 14, 2025 | |
| Speed of multiple dispatch | 14 | 1300 | November 27, 2023 | |
| Efficiency of Multiple Dispatch | 3 | 246 | November 10, 2024 |