bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++11 move semantics


From: Hans Åberg
Subject: Re: C++11 move semantics
Date: Sun, 11 Mar 2018 19:25:07 +0100


> On 11 Mar 2018, at 19:13, Frank Heckenbach <address@hidden> wrote:
> 
>> Some tests showed that compilers can optimize better than human.
>> So is probably better to just write a well structured code, and
>> then profile to find hot spots.
> 
> Certainly. I know in my programs the parser is not the hot spot at
> all. Even where it is, the dynamic reallocation of vector probably
> still isn't the hot spot. If you find a case where it's so, you can
> switch to deque, but I'll keep vector as the default.

Since Bison uses std::vector as default, it may be best to keep it. The parser 
does a lot referencing down the stack below the top, which is fast on an array.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]