Unittests pass, and then an invalid memory operation happens after?
Lance Bachmeier
no at spam.net
Sun Apr 7 03:48:24 UTC 2024
On Wednesday, 3 April 2024 at 21:57:00 UTC, Liam McGillivray
wrote:
> Alright. I suppose that some of the optimization decisions I
> have made so far may have resulted in less readable code for
> little performance benefit. Now I'm trying to worry less about
> optimization. Everything has been very fast so far.
>
> I haven't used a profiler yet, but I may like to try it.
A good example where you people will get fooled is to avoid
passing structs as function arguments/return values because
you're worried about copying:
https://forum.dlang.org/post/jifumskhdmxkimtayzva@forum.dlang.org
I'm guilty of having done that regularly until I learned how the
compiler actually works and how little time certain operations
take. One time I even changed clear string arguments to
hard-to-remember single char values inside a loop.
More information about the Digitalmars-d-learn
mailing list