[Kstars-devel] KDE/kdeedu/kstars/kstars/skyobjects
Akarsh Simha
akarshsimha at gmail.com
Thu Jun 4 13:04:24 CEST 2009
On Thu, Jun 04, 2009 at 02:32:37PM +0400, Alexey Khudyakov wrote:
> On Thursday 04 of June 2009 08:13:02 Akarsh Simha wrote:
> > But the mix of malloc/free and C++ objects is done for time
> > optimization. We checked that removing the ctor drastically increased
> > speed of loading.
> >
> For quick and dirty implementation it gives about 2 fold speed increase in
> DeepStarComponent::loadStaticStars().
>
> 230±40ms for memcpy
> 440±80ms for naive C++ only implementation.
>
> There are other methods of more C++ flavour. Placement new for example.
I remember reading about the placement new operator. Does that help
here?
> > I'll anyway check that it works. It's time for the KDE 4.3 release.
> >
> It should, because freshly constructed StarObject doesn't hold AuxData
Right. I checked that it works.
I don't know what's the best way to handle the AuxInfo free problem. I
thought I could make StarBlock a friend of StarObject. Is that a good
idea?
Regards
Akarsh
More information about the Kstars-devel
mailing list