Quantcast

Proposed C++ optimization with big speed gains with big objects

classic Classic list List threaded Threaded
24 messages Options
Proposed C++ optimization with big speed gains with big objects – Hi guys Hi guys I wana discuss proposed optimization step(optional switch?) to c++ compiller that would make old and new code in some cases...
AMDG On 09/24/2012 03:37 AM, _ wrote: > Hi guys > > Hi guys > > I wana discuss proposed optimization step(optional switch...
...The old state of city[1] may need to be cleaned up. Thus, you would also have to call city[1].~Skyscapper(), first. I see this more li...
On 25.09.2012 01:36, Ladislav Nevery wrote: > ...The old state of city[1] may need to be > cleaned up. Thus, you would also have > to...
>The user did no such thing. The user decided to create a temporary and >then move-assign it to the old position. No the user said let...
On Tue, Sep 25, 2012 at 7:57 AM, Ladislav Nevery <neuralll@...> wrote: >>The user did no such thing. The user decided to create a tem...
int a=1; a=2; The moment I agreed to assign new value I agreed to old value being lost. This is normal and expected behavior. If you wana ...
On Tue, Sep 25, 2012 at 6:26 PM, Ladislav Nevery <neuralll@...> wrote: > int a=1; > a=2; > > The moment I agreed to assign...
Actually the sample you provided will work without problem. Since switch works only on first assign(after default constructor) TextFile text...
On Thu, Sep 27, 2012 at 12:51 AM, Ladislav Nevery <neuralll@...>wrote: > Actually the sample you provided will work without problem. ...
optimization was meant to finally provide effective creation of static arrays. Thats why in your case it will simply not be enabled. TextFil...
ups here is beter example that actually reflects your case with working optimization enabled. TextFile textfile[1000] textfile[1]=TextFile(...
On 27.09.2012 00:51, Ladislav Nevery wrote: > Anyway code logic (opening files etc) in default constructors is BLASPHEMY ! > :D such peopl...
Sorry I was joking :) such default constructors can be skipped
Hmm... Now that I think of it wouldnt skiping optimization for objects having any function call except memset from default constructor solve whole...
Re: Proposed C++ optimization with big speed gains with big objects – On Tue, Sep 25, 2012 at 09:26:03AM -0700, Ladislav Nevery wrote: > int a=1; > a=2; > > The moment I agreed to assign new value I ...
the idea was to enable it just for first initialization. ie we mark array elements last constructor was default one knowing this we can return ob...
>>>>> On Wed, 26 Sep 2012 01:47:41 -0700 (PDT), Ladislav Nevery <neuralll@...> said: Ladislav> Now about how releva...
Interesting idea to make it as a pragma. Thx:) What got me previously motivated about -fplacement_new_on_first_static_array_assign switch previou...
On Wed, Sep 26, 2012 at 01:47:41AM -0700, Ladislav Nevery wrote: > yes state machine will change. ie if you were doing let's say gets(from &g...
Hmm... Now that I think of it wouldnt skiping optimization for objects having any function call except memset from default constructor solve whole...
Le 25 sept. 2012 à 18:26, Ladislav Nevery <neuralll@...> a écrit : > int a=1; > a=2; > > The moment I agreed to assign ...
Skyscrapper city[1000]; city[1] = Skyscrapper("Empire State Building"); city[1].~Skyscraper(); // release member r...
but I completely understand your cautious approach. And I understand that any change must be thoroughly tested thats Why I actually wana implement...
Loading...