On Friday, 14 August 2015 at 19:44:17 UTC, Xinok wrote:
On Friday, 14 August 2015 at 18:12:42 UTC, anonymous wrote:
Other insert* functions call the private function
SList.initialize() which does the null-check for _root. I am
working on a PR adding the missing call in insertAfter -
that's a 1 line change. I am not a phobos dev.
I would do the null check in the insert* functions themselves.
Otherwise, you have the overhead of a function call, assuming
the function isn't inlined.
https://github.com/D-Programming-Language/phobos/pull/3557 may be
a better place to discuss this.
Note: I have not the knowledge to look at disassembly and to
figure out whether dmd inlined a function call or not.