Re: r36663 - lyx-devel/trunk/src

2010-12-03 Thread Pavel Sanda
Andre Poenitz wrote: > On Fri, Dec 03, 2010 at 08:58:32PM +0100, Pavel Sanda wrote: > > Andre Poenitz wrote: > > > Even some big guns were claiming for a while that deque is > > > uniformly better > > > > could you be more explicit about the source? sutter? > > Yes, I believe so. he revoked his

Re: r36663 - lyx-devel/trunk/src

2010-12-03 Thread Andre Poenitz
On Fri, Dec 03, 2010 at 08:58:32PM +0100, Pavel Sanda wrote: > Andre Poenitz wrote: > > Even some big guns were claiming for a while that deque is > > uniformly better > > could you be more explicit about the source? sutter? Yes, I believe so. Andre'

Re: r36663 - lyx-devel/trunk/src

2010-12-03 Thread Pavel Sanda
Andre Poenitz wrote: > Even some big guns were claiming for a while that deque is > uniformly better could you be more explicit about the source? sutter? pavel

Re: r36663 - lyx-devel/trunk/src

2010-12-03 Thread Andre Poenitz
On Thu, Dec 02, 2010 at 05:09:48PM -0500, Richard Heck wrote: > On 12/02/2010 04:54 PM, Vincent van Ravesteijn wrote: > >>I read somewhere that stacks are best implemented as deques. Don't ask me > >>why now, > >>but I think they are slightly cheaper. (I'm sure Andre would have a view > >>about thi

Re: r36663 - lyx-devel/trunk/src

2010-12-02 Thread Richard Heck
On 12/02/2010 05:01 PM, Vincent van Ravesteijn wrote: See also output_xhtml.h: typedef std::deque TagDeque; /// typedef std::vector TagStack; /// holds start tags until we know there is content in them. TagDeque pending_tags_; /// remembers the h

Re: r36663 - lyx-devel/trunk/src

2010-12-02 Thread Richard Heck
On 12/02/2010 04:54 PM, Vincent van Ravesteijn wrote: I read somewhere that stacks are best implemented as deques. Don't ask me why now, but I think they are slightly cheaper. (I'm sure Andre would have a view about this.) Some googling gives me: The C++ Standard, in section 23.1.1, offers some

Re: r36663 - lyx-devel/trunk/src

2010-12-02 Thread Vincent van Ravesteijn
See also output_xhtml.h: typedef std::deque TagDeque; /// typedef std::vector TagStack; /// holds start tags until we know there is content in them. TagDeque pending_tags_; /// remembers the history, so we can make sure we nest properly. TagS

Re: r36663 - lyx-devel/trunk/src

2010-12-02 Thread Pavel Sanda
Pavel Sanda wrote: > Vincent van Ravesteijn wrote: > > Especially for amateurs like me who don't know what a deque is, I > > would prefer to use vector... keep it simple and stupid ;). > > your code doesn't suggest newbie, so to learn one more standard class > like degue :) we use it elsewhere as

Re: r36663 - lyx-devel/trunk/src

2010-12-02 Thread Pavel Sanda
Vincent van Ravesteijn wrote: > Especially for amateurs like me who don't know what a deque is, I > would prefer to use vector... keep it simple and stupid ;). your code doesn't suggest newbie, so to learn one more standard class like degue :) we use it elsewhere as well... pavel

Re: r36663 - lyx-devel/trunk/src

2010-12-02 Thread Vincent van Ravesteijn
> I read somewhere that stacks are best implemented as deques. Don't ask me > why now, > but I think they are slightly cheaper. (I'm sure Andre would have a view > about this.) Some googling gives me: The C++ Standard, in section 23.1.1, offers some advice on which containers to prefer. It says:

Re: r36663 - lyx-devel/trunk/src

2010-12-02 Thread Richard Heck
On 12/02/2010 03:27 PM, Vincent van Ravesteijn wrote: - /// Call then when existing things like footnotes. + /// Call this when existing things like footnotes. void restoreLastLayout() { layout_stack_.pop_back(); } exiting ? Besides, why are counter_stack_ and layout_stack_

Re: r36663 - lyx-devel/trunk/src

2010-12-02 Thread Vincent van Ravesteijn
> -       /// Call then when existing things like footnotes. > +       /// Call this when existing things like footnotes. >        void restoreLastLayout() { layout_stack_.pop_back(); } exiting ? Besides, why are counter_stack_ and layout_stack_ deque's ? >/// Used to keep track of active counte