Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-xxxfer.readnews.com!198.186.190.250.MISMATCH!transit3.readnews.com!news-out.readnews.com!hwmnpeer01.lga!hwmedia!news.highwinds-media.com!cycny01.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny01.POSTED!9244eeff!not-for-mail From: "David Cressey" Newsgroups: comp.databases.theory References: <9OCTf.2923$1U1.813@trndny05> <1142905138.510611.192090@g10g2000cwb.googlegroups.com> <1143040534.267722.315990@t31g2000cwb.googlegroups.com> <1143427858.477605.323000@u72g2000cwu.googlegroups.com> <1143467991.957597.163880@z34g2000cwc.googlegroups.com> <1143516768.848726.281690@g10g2000cwb.googlegroups.com> <1143546405.035888.3990@u72g2000cwu.googlegroups.com> Subject: Re: More on lists and sets Lines: 33 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-ID: Date: Tue, 28 Mar 2006 13:04:36 GMT NNTP-Posting-Host: 71.127.4.129 X-Complaints-To: abuse@verizon.net X-Trace: trndny01 1143551076 71.127.4.129 (Tue, 28 Mar 2006 08:04:36 EST) NNTP-Posting-Date: Tue, 28 Mar 2006 08:04:36 EST Xref: dp-news.maxwell.syr.edu comp.databases.theory:37628 "vc" wrote in message news:1143546405.035888.3990@u72g2000cwu.googlegroups.com... > intersect is list intersection, e.g., > > [1,2,3,4] `intersect` [2,4,6,8] == [2,4] > Looks like set intersection to me. And I'm going to ask: dontcha have to sort the two lists to find the common elements? And, if you do have to sort, what if the two lists each have 10,000 elements? Isn't that going to slow you down? More importanlty, if you have to sort the elements (based on their value), haven't you basically ignored the fact that they were ordered to begin with? Another way of asking the same question: [1,2,3,4] `intersect` [2,4,6,8] == [4,2] Is this a "wrong" answer? Or is it a second "right" answer? Another way of asking the same question: Is a pizza with onions and mushrooms the same thing as a pizza with mushrooms and onions?