<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; Lua деградирует?]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10678&amp;type=atom" />
	<updated>2015-06-04T10:50:23Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10678</id>
		<entry>
			<title type="html"><![CDATA[Re: Lua деградирует?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=94357#p94357" />
			<content type="html"><![CDATA[<p>То, что программы становятся больше и медленнее? Вполне.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2015-06-04T10:50:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=94357#p94357</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Lua деградирует?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=94356#p94356" />
			<content type="html"><![CDATA[<p>Доброго дня.</p><p>Нашел в интернете сравнение скорости различных языков, на основе небольшого скрипта. Провел испытания для различных версий Lua.</p><div class="codebox"><pre><code>--http://onlyjob.blogspot.ru/2011/03/perl5-python-ruby-php-c-c-lua-tcl.html
io.stdout:setvbuf &quot;no&quot;;             --  io.flush();

str = &#039;abcdefgh&#039;..&#039;efghefgh&#039;;
imax = 1024/string.len(str)*1024*1;         -- 1mb

starttime = os.time();
print &quot;exec.tm.sec\tstr.length&quot;;

gstr, i = &#039;&#039;, 0;

while i &lt; imax+1000 do
    i = i + 1;
    gstr = gstr..str;
    gstr = string.gsub(gstr, &quot;efgh&quot;,&quot;____&quot;);
    lngth = string.len(str) * i;
    if (math.mod(lngth,1024*256) == 0) then
        print(os.time()-starttime..&quot;sec\t\t&quot;..(lngth/1024)..&quot;kb&quot;);
    end
end</code></pre></div><p>И вот что вышло.<br /></p><div class="codebox"><pre><code>C:\Lua_tests&gt;lua-5.1.4\lua.exe test514.lua
exec.tm.sec     str.length
29sec           256kb
117sec          512kb
264sec          768kb
469sec          1024kb

C:\Lua_tests&gt;lua-5.2.3\lua52.exe test523.lua
exec.tm.sec     str.length
30sec           256kb
118sec          512kb
272sec          768kb
485sec          1024kb

C:\Lua_tests&gt;lua-5.3\lua53.exe test53.lua
exec.tm.sec     str.length
34sec           256.0kb
139sec          512.0kb
319sec          768.0kb
568sec          1024.0kb</code></pre></div><p>Как вы считаете, это нормально?</p>]]></content>
			<author>
				<name><![CDATA[DnsIs]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26282</uri>
			</author>
			<updated>2015-06-04T10:14:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=94356#p94356</id>
		</entry>
</feed>
