monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Typesafe VA_ARGS replacement for database::execute/


From: Timothy Brownawell
Subject: Re: [Monotone-devel] Typesafe VA_ARGS replacement for database::execute/fetch
Date: Sat, 21 Jan 2006 03:11:51 -0600

On Fri, 2006-01-20 at 20:03 -0800, Nathaniel Smith wrote:
> On Fri, Jan 20, 2006 at 04:12:35PM +0100, Christof Petig wrote:
> > I strongly feel that varargs is a bad choice for C++ programs, using
> > your proposed % syntax is much cleaner (as with L() and boost::format).
> 
> He actually told me the same thing when I suggested going back to this
> :-).  Maybe I agree with you guys... but I should say why I suggested
> it.  The thing is that for an API like:
>   query("blah") % foo % bar % baz
> I feel rather uncomfortable unless we copy the foo/bar/baz strings
> into the query object; 
[...]
> Since we shovel hundreds of megabytes through this interface, reducing
> copying seems worthwhile.  I guess we do always copy now, though, so
> actually I guess I have no data on whether the win is valuable or not.
> We spend a lot of time in sqlite, but I don't know where exactly.

Aren't strings copy-on-write anyway, so this shouldn't be a problem?

Tim






reply via email to

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