Slow performance compared to C++, ideas?

Jonathan M Davis jmdavisProg at gmx.com
Thu Jun 6 14:45:10 PDT 2013


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


More information about the Digitalmars-d mailing list