Andre Poenitz <[EMAIL PROTECTED]> writes:
| On Tue, Sep 16, 2003 at 05:04:32PM +0200, Lars Gullik Bjønnes wrote:
>> Be careful now remember that the standard dictates different
>> return values for [] (not quite sure about at)
>>
>> test_[] depending on const or not.
>>
>> A lot safer to put
On Tue, Sep 16, 2003 at 05:04:32PM +0200, Lars Gullik Bjønnes wrote:
> Be careful now remember that the standard dictates different
> return values for [] (not quite sure about at)
>
> test_[] depending on const or not.
>
> A lot safer to put an assert there and just use [] instead of at.
As
On Tue, Sep 16, 2003 at 03:57:02PM +, Angus Leeming wrote:
> Andre Poenitz wrote:
>
> > if not, I'd like to replace this with an inlined
> >
> > Paragraph::value_type Paragraph::getChar(pos_type pos) const
> > {
> > text_.at(pos);
> > }
> >
> > or even
Andre Poenitz <[EMAIL PROTECTED]> writes:
| Does this Assert and the error message trigger often nowadays?
>
| Paragraph::value_type Paragraph::getChar(pos_type pos) const
| {
| // This is in the critical path!
| pos_type const siz = text_.size();
>
|
Angus Leeming <[EMAIL PROTECTED]> writes:
| Andre Poenitz wrote:
>
>> if not, I'd like to replace this with an inlined
>>
>> Paragraph::value_type Paragraph::getChar(pos_type pos) const
>> {
>> text_.at(pos);
>> }
>>
>> or even
>>
>> Paragraph::va
Andre Poenitz wrote:
> if not, I'd like to replace this with an inlined
>
> Paragraph::value_type Paragraph::getChar(pos_type pos) const
> {
> text_.at(pos);
> }
>
> or even
>
> Paragraph::value_type Paragraph::getChar(pos_type pos) const
>
On Tue, Sep 16, 2003 at 04:52:16PM +0200, Andre Poenitz wrote:
> Does this Assert and the error message trigger often nowadays?
It's pretty easy to trigger but not as common as it was.
> for a 6% (or 9%) speedup...
Let's do that before release.
regards
john
--
Khendon's Law:
If the same point
Does this Assert and the error message trigger often nowadays?
Paragraph::value_type Paragraph::getChar(pos_type pos) const
{
// This is in the critical path!
pos_type const siz = text_.size();
BOOST_ASSERT(pos <= siz);