Lambdas do not get inlined by DMD for some reason. There is a pull to enforce such optimization.
https://github.com/D-Programming-Language/dmd/pull/2483