‹¹‹è¯•å•元的代ç :
******************
@Test
public void deepCloneVsSerial() throws CloneNotSupportedException, IOException, ClassNotFoundException {
int max = 100000;
String manName = "Robert C. Martin";
int manAge = 40;
int teacherAge = 50;
String teacherName = "T1";
Teacher teacher = new Teacher(teacherName, teacherAge);
Man man = new Man(manName, manAge, teacher);
//begin
long start1 = System.currentTimeMillis();
for (int i = 0; i < max; i++) {
man.clone();
}
long end1 = System.currentTimeMillis();
System.err.println(max + " clone time:" + (end1 - start1));
long start2 = System.currentTimeMillis();
for (int i = 0; i < max; i++) {
man.serialClone();
}
long end2 = System.currentTimeMillis();
System.err.println(max + " serial clone time:" + (end2 - start2));
]]>re: 求质敎ͼŒéš¾ä»¥ç†è§£çš„代ç ,有兴‘£å¯ä»¥çœ‹ä¸€ä¸?/title><link>http://www.aygfsteel.com/zhb8015/archive/2012/04/12/373982.html#373991</link><dc:creator>zhb8015</dc:creator><author>zhb8015</author><pubDate>Thu, 12 Apr 2012 09:52:00 GMT</pubDate><guid>http://www.aygfsteel.com/zhb8015/archive/2012/04/12/373982.html#373991</guid><description><![CDATA[Robert C. Martin's explation:
<br>
<br>
<br>/**
<br> * Every multiple in the array has a prime factor that
<br> * is less than or equal to the root of the array size,
<br> * so we don't have to cross of multiples of numbers
<br> * larger than that root.
<br> */<img src ="http://www.aygfsteel.com/zhb8015/aggbug/373991.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/zhb8015/" target="_blank">zhb8015</a> 2012-04-12 17:52 <a href="http://www.aygfsteel.com/zhb8015/archive/2012/04/12/373982.html#373991#Feedback" target="_blank" style="text-decoration:none;">å‘表评论</a></div>]]></description></item><item><title>re: Advice about migrating to new platfrom http://www.aygfsteel.com/zhb8015/archive/2012/04/05/373193.html#373363qingyueqingyueThu, 05 Apr 2012 04:34:00 GMThttp://www.aygfsteel.com/zhb8015/archive/2012/04/05/373193.html#373363
]]>re: Advice about migrating to new platfrom http://www.aygfsteel.com/zhb8015/archive/2012/04/03/373193.html#373278tbtbTue, 03 Apr 2012 05:19:00 GMThttp://www.aygfsteel.com/zhb8015/archive/2012/04/03/373193.html#373278