Boost logo

Boost :

From: Jan Gaspar (jga_at_[hidden])
Date: 2003-07-21 10:19:28


Daniel Frey wrote:

> Jan Gaspar wrote:
> >>3. cb_iterator: is the m_end value needed?
> >>
> >> It can be computed using 'm_it == m_buff->m_last' in
> >> those few (~2) places it is needed and if eliminated,
> >> iterator will get smaller (by 30%) and simpler.
> >
> >
> > Yes, the m_end member is needed. Suppose the circular_buffer is full. Then
> > m_buff->m_first == m_buff->m_last. If there is no m_end variable how would you
> > recognize that the iterator points to the beginning or end?
>
> I think that by adding some more logic, it should be possible to
> eliminate the m_end. The flag can be replaces by letting m_it point
> behind m_buff or set it to 0. I think it's worth to test it, although
> it's hard to predict the benchmark results...

It is a good idea! I will try it.

Jan

>
>
> Regards, Daniel
>
> --
> Daniel Frey
>
> aixigo AG - financial training, research and technology
> Schloß-Rahe-Straße 15, 52072 Aachen, Germany
> fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
> eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

--
Jan Gaspar | jga_at_[hidden]
Whitestein Technologies | www.whitestein.com
Panenska 28 | SK-81103 Bratislava | Slovak Republic
Tel +421(2)5930-0735 | Fax +421(2)5443-5512

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk