On Wednesday, 25 August 2021 at 13:30:58 UTC, rushsteve1 wrote:
>On Wednesday, 25 August 2021 at 06:23:37 UTC, Kagamin wrote:
>You marked all functions inline?
If I did then it wasn't on purpose, I was only trying to mark the handful of helper functions as inline. If you know a solution to this, that would be greatly appreciated!
When you use an attribute with a colon after it, like you do on line 232 of trash.d:
pragma(inline):
Then it applies not just to the next declaration, but to all subsequent declarations in the same scope (which in this case is the entire rest of the module).
(Source: first paragraph in the "Attributes" section of the spec.)
To avoid this, just remove the colon.
To be honest, you could probably remove pragma(inline)
from the program altogether and not notice a difference. A program like this is almost certainly going to be bottlenecked on IO long before function-call overhead makes a noticeable difference to performance.