Variable-length stack allocated arrays

bearophile bearophileHUGS at lycos.com
Mon Jan 11 02:26:28 PST 2010


grauzone:
> Why are you making such proposals, when one of the core developers even 
> thought about removing normal "scope"?

I have a nice implementation of Barnes-Hut algorithm translated from Java. Its running time goes from 18.1 seconds to 7.6 s adding "scope" where some classes are initialized (those classes are 3D vectors, that can also become structs).

If scope classes are removed, then it may be necessary to add struct inheritance to D2, because in several situations objects can't be used (and by the way, the very latest Java HotSpot needs about 10.9 s to run the same code, despite it performs Escape Analysis, probably because such Analysis is not as good as my manual scope annotations). On request I can show all the code discussed here.

Bye,
bearophile



More information about the Digitalmars-d mailing list