monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] set verses vector in args_to_paths


From: Zack Weinberg
Subject: Re: [Monotone-devel] set verses vector in args_to_paths
Date: Sun, 12 Oct 2008 17:28:41 -0700

On Sun, Oct 12, 2008 at 5:20 PM, Derek Scherger <address@hidden> wrote:
> When I was fiddling with the include/exclude stuff I noticed that
> args_to_paths returns a vector of paths which is used almost exclusively in
> calls to restriction constructors.

"It was that way when I got here." :-)

> These quickly turn the vectors into sets
> of paths and I wondered whether it would be better if everything just worked
> in terms of sets.

The only thing I'd be worried about is making sure we're not doing a
std::set copy now (which is more expensive than a std::vector copy).
Restriction objects tend to be on the stack so maybe they don't need
to copy (constructor takes a reference?)

zw




reply via email to

[Prev in Thread] Current Thread [Next in Thread]