Slow performance compared to C++, ideas?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Jun 6 16:24:32 PDT 2013


On 6/6/13 5:45 PM, Jonathan M Davis wrote:
> On Thursday, June 06, 2013 17:23:03 Andrei Alexandrescu wrote:
>>> LOL. Yes, well. That's certainly much closer, but if the shared library
>>> changes and later derives more types than it did before. And since shared
>>> libraries can be swapped out, that could break the optimizations that the
>>> tool did, so you'd have to run the tool over the whole thing again. So,
>>> it's definitely an idea with potential, but I don't think that it could
>>> be guaranteed to work in all cases, and the programmer likely have to be
>>> aware of when it didn't work in order to avoid some nasty bugs.
>>
>> There would be no bugs, worst case compilation errors. (The tool I'm
>> envisioning would add final annotations or prompt the user to add them.)
>
> That would definitely work, but it would probably work better if the user were
> told to add them rather than them being add automatically, or you risk some
> functions being devrtualized when it's known a shared library may need them to
> be virtual in a later version. Regardless, at minimum, it would provide a way
> to track down all of the virtual functions which may not need to be virtual,
> which could be quite valuable regardless of whether the programmer decides to
> make them non-virtual or not
>
> - Jonathan M Davis

--in-place

Andrei


More information about the Digitalmars-d mailing list