[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.
- Re: C++11 move semantics, (continued)
- Re: C++11 move semantics, Frank Heckenbach, 2018/03/10
- Re: C++11 move semantics, Rici Lake, 2018/03/10
- Re: C++11 move semantics, Hans Åberg, 2018/03/11
- Re: C++11 move semantics, Frank Heckenbach, 2018/03/11
- Re: C++11 move semantics, Hans Åberg, 2018/03/11
- Re: C++11 move semantics, Frank Heckenbach, 2018/03/11
- Re: C++11 move semantics, Hans Åberg, 2018/03/11
- Re: C++11 move semantics, Frank Heckenbach, 2018/03/11
- Re: C++11 move semantics, Hans Åberg, 2018/03/11
- Re: C++11 move semantics, Frank Heckenbach, 2018/03/11
- Re: C++11 move semantics,
Hans Åberg <=
- Re: C++11 move semantics, Hans Åberg, 2018/03/05
Re: C++11 move semantics, Hans Åberg, 2018/03/04