http://d.puremagic.com/issues/show_bug.cgi?id=3274


Martin Nowak <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]


--- Comment #3 from Martin Nowak <[email protected]> 2013-04-07 09:04:10 PDT ---
(In reply to comment #1)
> The compiler does this as a compile performance optimization. Otherwise,
> template instantiations have to be done over and over, filling the object
> files, and then the linker has to remove the duplicates.
> 
It remains an incorrect optimization that just works most of the time.

> The workaround for an incremental build system is straightforward - put only
> one source module on a command to dmd at a time.

The performance impact of this is also huge. The only reason to do this in the
first place is to avoid duplicate parsing and semantic. However we can't make
any assumptions how the generated object files are linked therefor each of them
needs to get the required TypeInfo, templates et.al.

To put this into perspective, copying is only required when building multiple
object files. It is not required when building an executable, a shared library
or a single object (which may contain multiple modules, i.e. -c -of).

Maybe we can move the copying more to the backend so that we don't have to
rerun IRgen and codegen.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to