[Bug 205] Add pragma(inline) to the grammar

via D.gnu d.gnu at puremagic.com
Sun Jan 31 02:52:38 PST 2016


http://bugzilla.gdcproject.org/show_bug.cgi?id=205

--- Comment #6 from thomas.bockman at gmail.com ---
> That says there's something more wrong going on about you than the compiler.

Let me fix that for you:

> That says there's something more wrong going on about DMD than GDC.

For checkedint I achieved approximately a 10x speedup on DMD by thorough
application of pragma(inline, ...) throughout the code base.

(5x comes from pragma(inline, true) helping me figure out how to tweak each
trivial function until DMD finally admits that it's inlinable. This is
basically impossible to reliably do blind, because of nonsense like this:
    https://issues.dlang.org/show_bug.cgi?id=15483

2x comes from marking two specific, tiny error handling functions that throw as
pragma(inline, false); otherwise they inline, but then the caller (everything
else, basically) usually doesn't.)

This is completely unnecessary on GDC, whose inliner is nowhere near as easily
confused. But, as I said in my original request, I want this so that I don't
have to maintain a separate version of the code just for GDC.

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20160131/12739c09/attachment.html>


More information about the D.gnu mailing list