[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More (Windows) Errors
From: |
David Philippi |
Subject: |
Re: More (Windows) Errors |
Date: |
Sat, 19 Oct 2002 17:17:06 +0200 |
User-agent: |
KMail/1.4.1 |
On Saturday 19 October 2002 11:03, David Philippi wrote:
> I'd guess that the second variant works in evey case and should be used
> without #ifdef. There shouldn't be any noticable performance difference
> between the two and while I consider the first is better style, we're
> loosing this advantage with GCC too because we have both in the code.
I should think more before writing, not only is the code wrong (see other
mail), there's also the fact that performance does differt between the two
solutions.
Range insert is an optimized function of vector which will probably consist
of a resize() and a memcpy() internally while the other variant needs two
template instatiations (std::copy, std::inserter) and uses a loop
internally.
The best solution therefore is - probably (I'm learning *g*) - to use a
vector_helper.hxx like the old list_helper which contains the corrected code
with #ifdef. If this method is declared inline there should be no
performance loss at all on GCC and we can remove it as soon as VC++ 7 get's
more widespread. That said one could consider to change the ifdef exclude
VC++ 7
#if defined(WIN32) && !defined (MSVC_VER >= 7)
(Or whatever version constant is).
Bye David
- Re: Fun Windows Errors, (continued)
- Re: Fun Windows Errors, Neil Hotmail, 2002/10/14
- Re: Fun Windows Errors, Ingo Ruhnke, 2002/10/14
- More (Windows) Errors, Neil Hotmail, 2002/10/18
- Re: More (Windows) Errors, David Philippi, 2002/10/18
- Re: More (Windows) Errors, Ingo Ruhnke, 2002/10/18
- Re: More (Windows) Errors, David Philippi, 2002/10/19
- Re: More (Windows) Errors, David Philippi, 2002/10/19
- Re: More (Windows) Errors, Ingo Ruhnke, 2002/10/19
- Re: More (Windows) Errors, David Philippi, 2002/10/19
- Re: More (Windows) Errors, David Philippi, 2002/10/19
- Re: More (Windows) Errors,
David Philippi <=