<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: JavaScript 数组的 uniq 方法</title>
	<atom:link href="http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/feed/" rel="self" type="application/rss+xml" />
	<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/</link>
	<description>web 标准，前端开发，编程感悟，生活杂想</description>
	<lastBuildDate>Mon, 22 Feb 2010 09:15:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cloud</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-145004</link>
		<dc:creator>cloud</dc:creator>
		<pubDate>Fri, 03 Apr 2009 16:17:36 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-145004</guid>
		<description>freeman983那个貌似没有删除数组条目中重复的条目吧</description>
		<content:encoded><![CDATA[<p>freeman983那个貌似没有删除数组条目中重复的条目吧</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dh20156</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-95979</link>
		<dc:creator>dh20156</dc:creator>
		<pubDate>Wed, 17 Sep 2008 06:11:12 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-95979</guid>
		<description>参见http://www.v-ec.com/jslib
[去除重复]部分</description>
		<content:encoded><![CDATA[<p>参见http://www.v-ec.com/jslib<br />
[去除重复]部分</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lone</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-57361</link>
		<dc:creator>lone</dc:creator>
		<pubDate>Mon, 14 Apr 2008 08:18:05 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-57361</guid>
		<description>freeman983的思路才叫巧妙...相形见绌阿~~赫赫</description>
		<content:encoded><![CDATA[<p>freeman983的思路才叫巧妙&#8230;相形见绌阿~~赫赫</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 闲耘</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-55409</link>
		<dc:creator>闲耘</dc:creator>
		<pubDate>Tue, 08 Apr 2008 12:21:31 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-55409</guid>
		<description>题目我好像理解错了，但是：
1. 这个题目本身有歧义，条件也不明确（例如没有说明方法是否影响数组本身）；
2. 我认为返回“被删除元素”（所组成）的新数组没有什么意义；
3. 返回删除（重复）元素后的新数组不需要这些算法。</description>
		<content:encoded><![CDATA[<p>题目我好像理解错了，但是：<br />
1. 这个题目本身有歧义，条件也不明确（例如没有说明方法是否影响数组本身）；<br />
2. 我认为返回“被删除元素”（所组成）的新数组没有什么意义；<br />
3. 返回删除（重复）元素后的新数组不需要这些算法。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 闲耘</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-54893</link>
		<dc:creator>闲耘</dc:creator>
		<pubDate>Mon, 07 Apr 2008 16:09:57 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-54893</guid>
		<description>看了“博主”和“博客”的种种算法，很快，但是结果都不正确。</description>
		<content:encoded><![CDATA[<p>看了“博主”和“博客”的种种算法，很快，但是结果都不正确。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: freeman983</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-45008</link>
		<dc:creator>freeman983</dc:creator>
		<pubDate>Thu, 21 Feb 2008 03:03:30 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-45008</guid>
		<description>不懂算法,利用hash实现了一个

http://freeman983.javaeye.com/blog/163799</description>
		<content:encoded><![CDATA[<p>不懂算法,利用hash实现了一个</p>
<p><a href="http://freeman983.javaeye.com/blog/163799" rel="nofollow">http://freeman983.javaeye.com/blog/163799</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: freeman983</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-45002</link>
		<dc:creator>freeman983</dc:creator>
		<pubDate>Thu, 21 Feb 2008 02:05:34 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-45002</guid>
		<description>不懂算法,利用hash实现了一个

Array.prototype.uniq_freeman983 = function(){
  window.status=&#039;freeman983&#039;;
  var oa = this;
	var ya = new Object();
	var ra = [];
	
	for(var i = 0; i </description>
		<content:encoded><![CDATA[<p>不懂算法,利用hash实现了一个</p>
<p>Array.prototype.uniq_freeman983 = function(){<br />
  window.status=&#8217;freeman983&#8242;;<br />
  var oa = this;<br />
	var ya = new Object();<br />
	var ra = [];</p>
<p>	for(var i = 0; i</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tansia</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-43150</link>
		<dc:creator>tansia</dc:creator>
		<pubDate>Sun, 27 Jan 2008 17:16:04 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-43150</guid>
		<description>又学了一招。</description>
		<content:encoded><![CDATA[<p>又学了一招。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bob_jia</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-42997</link>
		<dc:creator>bob_jia</dc:creator>
		<pubDate>Fri, 25 Jan 2008 09:20:22 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-42997</guid>
		<description>我也写了下，貌似性能还不错。
http://www.zhaozhaozhu.com/bob/bob_array_uniq.html

另外，前两种方法的输出结果好象不太对吧。</description>
		<content:encoded><![CDATA[<p>我也写了下，貌似性能还不错。<br />
<a href="http://www.zhaozhaozhu.com/bob/bob_array_uniq.html" rel="nofollow">http://www.zhaozhaozhu.com/bob/bob_array_uniq.html</a></p>
<p>另外，前两种方法的输出结果好象不太对吧。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: happierbee</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-42474</link>
		<dc:creator>happierbee</dc:creator>
		<pubDate>Fri, 18 Jan 2008 10:11:27 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-42474</guid>
		<description>其实没有必要用新的数组，可以在原数组基础上修改：
Array.prototype.uniq2 = function () {
    function seen( arr, ele, len ) {
        for ( var i = 0; i </description>
		<content:encoded><![CDATA[<p>其实没有必要用新的数组，可以在原数组基础上修改：<br />
Array.prototype.uniq2 = function () {<br />
    function seen( arr, ele, len ) {<br />
        for ( var i = 0; i</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wondger</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-42466</link>
		<dc:creator>wondger</dc:creator>
		<pubDate>Fri, 18 Jan 2008 07:52:11 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-42466</guid>
		<description>这两个函数写的真好～···
    function include(arr, value){
        for (var i=0, n=arr.length; i</description>
		<content:encoded><![CDATA[<p>这两个函数写的真好～···<br />
    function include(arr, value){<br />
        for (var i=0, n=arr.length; i</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: boin</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-42040</link>
		<dc:creator>boin</dc:creator>
		<pubDate>Sat, 12 Jan 2008 15:53:56 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-42040</guid>
		<description>跟PrototypeJs的实现类似了。

如fdcn所说，include作为闭包函数，效率是不如拿出来做一个全局的函数。</description>
		<content:encoded><![CDATA[<p>跟PrototypeJs的实现类似了。</p>
<p>如fdcn所说，include作为闭包函数，效率是不如拿出来做一个全局的函数。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fdcn</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-41887</link>
		<dc:creator>fdcn</dc:creator>
		<pubDate>Thu, 10 Jan 2008 17:39:03 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-41887</guid>
		<description>测试了一下，你的新算法中function include函数单独做成Array.prototype.include，能更快一点。</description>
		<content:encoded><![CDATA[<p>测试了一下，你的新算法中function include函数单独做成Array.prototype.include，能更快一点。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kejun</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-40574</link>
		<dc:creator>Kejun</dc:creator>
		<pubDate>Tue, 25 Dec 2007 06:03:17 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-40574</guid>
		<description>不用push会快一些</description>
		<content:encoded><![CDATA[<p>不用push会快一些</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Delta</title>
		<link>http://chen.xianan.name/blog/2007/12/07/uniq-method-for-js-array/comment-page-1/#comment-40229</link>
		<dc:creator>Delta</dc:creator>
		<pubDate>Sat, 22 Dec 2007 11:13:47 +0000</pubDate>
		<guid isPermaLink="false">http://realazy.org/blog/2007/12/07/uniq-method-for-js-array/#comment-40229</guid>
		<description>理论上unique_slow那个会快……
个人认为是splice（）比较耗性能  所以实际会慢很多</description>
		<content:encoded><![CDATA[<p>理论上unique_slow那个会快……<br />
个人认为是splice（）比较耗性能  所以实际会慢很多</p>
]]></content:encoded>
	</item>
</channel>
</rss>
