LISTSERV mailing list manager LISTSERV 16.5

Help for QSERV-L Archives


QSERV-L Archives

QSERV-L Archives


QSERV-L@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

QSERV-L Home

QSERV-L Home

QSERV-L  April 2014

QSERV-L April 2014

Subject:

Re: [LSST-data] Notes from Qserv mtg (Mar 27)

From:

"Daniel L. Wang" <[log in to unmask]>

Reply-To:

General discussion for qserv (LSST prototype baseline catalog)

Date:

Mon, 7 Apr 2014 19:21:23 -0700

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (37 lines)

Robert,

On 03/28/2014 07:46 PM, Robert Lupton the Good wrote:
>>   1) std::list --> std::vector
>>      - why? Default now is vector, iterating over vector
>>        is much more efficient than over list
>>      - reason why we use lists: want to convey the intent
>>        (put things in the end, remove from the end etc),
>>        yes can be implemented through vector
>>      - revisit on case by case bases, do not blindly replace
>>      - preferred solution: typedef, and name it in a way that
>>        conveys the intent (e.g., might call it a "container"),
>>        underneath use vector
> If you just want to insert at each end, isn't a dequeue better?  And see Meyers "Effective STL" on why it may not be a good idea to typedef a container --- he certainly thinks that you should choose the STL type and expose it.
The point was to use a typedef (e.g., FooContainer) to convey the intent 
of code that just needs a dumb container of Foo whose implementation is 
not important.

Meyers seems to think it's useless to write container-independent code, 
but also suggests typedefs for encapsulating the selection of the STL 
type. Okay, he does say one should carefully consider all the options, 
and disagrees with the C++ standard's recommendation of vector as the 
default.

I'm starting to be convinced by AndyS's argument that we should just 
choose vector, but I still feel like I want to convey the intent of "I 
just need a container for Foo; not sure what the best container is; 
haven't done the study."

-Daniel

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the QSERV-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

March 2018
February 2018
January 2018
December 2017
August 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use