Inlining Ref Functions

Bill Baxter wbaxter at gmail.com
Fri May 15 13:57:55 PDT 2009


On Fri, May 15, 2009 at 1:36 PM, dsimcha <dsimcha at yahoo.com> wrote:
> The fact that DMD does not inline functions with ref parameters has come up
> several times deep in threads on this NG before, but it's never really
> received proper attention.  After changing a few swaps in performance-critical
> areas of my code to "manually inlined" swaps and seeing significant speedups,
> I'm kind of curious what the rationale is for not inlining functions w/ ref
> params.  Is there a good technical reason for this or is it simply a matter of
> having higher priorities?  Is inlining functions w/ ref params on the "to do
> eventually" list?

+1 on bumping up the priority on it.
Even if it it can't be made to work in every case, if it could at
least be made to work in simple cases like swap() then it would be
great boon for DMD benchmarks.

--bb



More information about the Digitalmars-d mailing list