<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[阿Tim日志]]></title> 
<link>https://atim.cn/index.php</link> 
<description><![CDATA[专业的php开发者.开发团队的带队人]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[阿Tim日志]]></copyright>
<item>
<link>https://atim.cn/post//</link>
<title><![CDATA[c,golang,java,php,nodejs,python,pypy运算速度粗焅比较]]></title> 
<author>bkkkd &lt;partybase@gmail.com&gt;</author>
<category><![CDATA[开发应用]]></category>
<pubDate>Wed, 22 Apr 2020 15:40:13 +0000</pubDate> 
<guid>https://atim.cn/post//</guid> 
<description>
<![CDATA[ 
	先把结果抛出来,<br/><div class="code"><br/>run java:<br/>end i:1000000000 count:499999999500000000 time:0.638<br/>run C:<br/>end i:1000000000 count 499999999500000000 time:0.641424<br/>run go:<br/>end i:1000000000 count:499999999500000000 time:1.277728 <br/>run pypy:<br/>end i:1000000000 count:499999999500000000 time:3.81583285332<br/>run php<br/>end i:1000000000 count:499999999500000000 time:26.515455007553<br/>run nodejs:<br/>end i:1000000000 count:499999999500000000 time:148.331<br/>run python:<br/>^Tend i:1000000000 count:499999999500000000 time:193.98550415<br/></div><br/>以上的结果进行了golang和c的性能优化.<br/><br/><br/><br/>这个结果是超出了我的预期的.<br/><br/>1,c和golang都没有启动优化,所以性能只是算是中间位置.作为参考时间<br/>2,java,nodejs和pypy,使用了JIT的都能运算的很快.(和目前这个测试算法有关,但确实明显对重复运算是有帮助)<br/>3,静态语言和动态语言的运营速度没有明显的差异,重点是有没有JIT<br/>4,python实在是太慢了,一直都知道python慢,但没有想到在运算方面会比php慢.<br/>5,nodejs在大数处理未如理想.如果不使用BigInt确实比php,python,pypy都要快.<br/><br/>ps:<br/>1.最终期待php8,因为php8带有jit.<br/>2.php确实错过了更好的发展.在2011年的时候如果接受了HHVM,也许不一个状态了.世事就是这样,在你最火的时候,后面就是开始走下坡.只有不段变更才会处于不败之地.<br/><br/>测试代码:<br/>https://gitee.com/goodtim/LangTest<br/><br/><br/><br/>未对golang和c进行优化的结果,nodejs未采用BigInt处理:<br/><div class="code"><br/>run C:<br/>end i:1000000000 count 499999999500000000 time:5.403450<br/>run go:<br/>end i:1000000000 count:499999999500000000 time:4.085926 <br/>run nodejs:<br/>end i:1000000000 count:499999999067109000 time:2.568<br/>run java:<br/>end i:1000000000 count:499999999500000000 time:1.281<br/>run php<br/>end i:1000000000 count:499999999500000000 time:27.162304878235<br/>run python:<br/>end i:1000000000 count:499999999500000000 time:200.668512821<br/>run pypy:<br/>end i:1000000000 count:499999999500000000 time:3.82159590721<br/></div><br/>
]]>
</description>
</item><item>
<link>https://atim.cn/post//#blogcomment</link>
<title><![CDATA[[评论] c,golang,java,php,nodejs,python,pypy运算速度粗焅比较]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://atim.cn/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>