[prev in list] [next in list] [prev in thread] [next in thread]
List: lua-l
Subject: Re: Feedback on (awesome) performance of lua 5.4 (work1)
From: "Tony Papadimitriou" <tonypdmtr () gmail ! com>
Date: 2018-03-17 21:59:07
Message-ID: FE1F7D3DC154425A94175CEF1E47189C () Yulichka
[Download RAW message or body]
You're right. My bad!
(I was using 5.3.4 mistakenly compiled with a different compiler.)
When compiled with the same compiler, the results are:
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
> a=os.time() for i=1,1000000000 do end print(os.time()-a)
21
c:\temp>lua54
Lua 5.4.0 (work1) Copyright (C) 1994-2018 Lua.org, PUC-Rio
> a=os.time() for i=1,1000000000 do end print(os.time()-a)
14
Sorry for the noise!
From: Rodrigo Azevedo
Sent: Saturday, March 17, 2018 11:24 PM
To: Lua mailing list
Subject: Re: Feedback on (awesome) performance of lua 5.4 (work1)
2018-03-17 15:06 GMT-03:00 Tony Papadimitriou <tonypdmtr@gmail.com>:
On the other hand, why does this "a=os.time() for i=1,1000000000 do end \
print(os.time()-a)" run much slower on 5.4 compared to 5.3?
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
a=os.time() for i=1,1000000000 do end print(os.time()-a)
9
Lua 5.4.0 (work1) Copyright (C) 1994-2018 Lua.org, PUC-Rio
a=os.time() for i=1,1000000000 do end print(os.time()-a)
14
I can't reproduce it!
For my machine
##### BEGIN #####
-- teste_time.lua
a=os.time() for i=1,1000000000 do end print(os.time()-a)
##### END ######
ROUND 1
-----------------------
time lua5.2 teste_time.lua
4
real 0m3.675s
user 0m3.675s
sys 0m0.000s
------------------------
time lua5.3 teste_time.lua
4
real 0m3.630s
user 0m3.612s
sys 0m0.004s
------------------------
time ./lua5.4 teste_time.lua
3
real 0m3.022s
user 0m2.996s
sys 0m0.016s
ROUND 2
----------------------------------------
Lua 5.4.0 (work1) Copyright (C) 1994-2018 Lua.org, PUC-Rio
> a=os.time() for i=1,1000000000 do end print(os.time()-a)
3
> os.exit()
Lua 5.3.3 Copyright (C) 1994-2016 Lua.org, PUC-Rio
> a=os.time() for i=1,1000000000 do end print(os.time()-a)
3
> os.exit()
-----------------------------------
Conclusion: lua5.4 is faster, even doing a pointless loop.
--
Rodrigo Azevedo Moreira da Silva
[Attachment #3 (text/html)]
<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Lucida Console'; COLOR: #000000">
<DIV>You're right. My bad!</DIV>
<DIV>(I was using 5.3.4 mistakenly compiled with a different compiler.)</DIV>
<DIV> </DIV>
<DIV>When compiled with the same compiler, the results are:</DIV>
<DIV> </DIV>
<DIV>Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio</DIV>
<DIV>>a=os.time() for i=1,1000000000 do end print(os.time()-a)</DIV>
<DIV>21</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>c:\temp>lua54</DIV>
<DIV>Lua 5.4.0 (work1) Copyright (C) 1994-2018 Lua.org, PUC-Rio</DIV>
<DIV>> a=os.time() for i=1,1000000000 do end print(os.time()-a)</DIV>
<DIV>14</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Sorry for the noise!</DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: \
normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'> <DIV style="FONT: 10pt \
tahoma"> <DIV><FONT size=3 face="Lucida Console"></FONT> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=rodrigoams@gmail.com
href="mailto:rodrigoams@gmail.com">Rodrigo Azevedo</A> </DIV>
<DIV><B>Sent:</B> Saturday, March 17, 2018 11:24 PM</DIV>
<DIV><B>To:</B> <A title=lua-l@lists.lua.org
href="mailto:lua-l@lists.lua.org">Lua mailing list</A> </DIV>
<DIV><B>Subject:</B> Re: Feedback on (awesome) performance of lua 5.4
(work1)</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: \
normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'> <DIV dir=ltr>2018-03-17 \
15:06 GMT-03:00 Tony Papadimitriou <SPAN dir=ltr><<A \
href="mailto:tonypdmtr@gmail.com" \
target=_blank>tonypdmtr@gmail.com</A>></SPAN>:<BR> <DIV class=gmail_extra>
<DIV class=gmail_quote>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) \
1px solid">On the other hand, why does this "a=os.time() for i=1,1000000000 do end
print(os.time()-a)" run much slower on 5.4 compared to 5.3?<BR><BR>Lua
5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) \
1px solid">a=os.time() for i=1,1000000000 do end \
print(os.time()-a)<BR></BLOCKQUOTE>9<BR><BR>Lua 5.4.0 (work1) Copyright (C) \
1994-2018 Lua.org, PUC-Rio<BR> <BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) \
1px solid">a=os.time() for i=1,1000000000 do end
print(os.time()-a)<BR></BLOCKQUOTE>14<BR><BR></BLOCKQUOTE>
<DIV> </DIV>
<DIV>I can't reproduce it!<BR><BR>For my machine <BR><BR></DIV>
<DIV>##### BEGIN #####<BR></DIV>
<DIV>-- teste_time.lua<BR>a=os.time() for i=1,1000000000 do end
print(os.time()-a)<BR></DIV>
<DIV>##### END ######<BR></DIV>
<DIV> </DIV>
<DIV>ROUND 1<BR><BR></DIV>
<DIV>-----------------------<BR><BR>time lua5.2
teste_time.lua<BR>4<BR><BR>real
0m3.675s<BR>user 0m3.675s<BR>sys
0m0.000s<BR><BR>------------------------<BR><BR>time lua5.3
teste_time.lua<BR>4<BR><BR>real
0m3.630s<BR>user 0m3.612s<BR>sys
0m0.004s<BR><BR>------------------------<BR><BR>time ./lua5.4
teste_time.lua<BR>3<BR><BR>real
0m3.022s<BR>user 0m2.996s<BR>sys
0m0.016s<BR><BR>ROUND
2<BR><BR>----------------------------------------<BR></DIV>
<DIV><BR><BR>Lua 5.4.0 (work1) Copyright (C) 1994-2018 Lua.org,
PUC-Rio<BR>> a=os.time() for i=1,1000000000 do end
print(os.time()-a)<BR>3<BR>> os.exit()<BR><BR>Lua 5.3.3 Copyright (C)
1994-2016 Lua.org, PUC-Rio<BR>> a=os.time() for i=1,1000000000 do end
print(os.time()-a)<BR>3<BR>>
os.exit()<BR><BR>-----------------------------------<BR><BR></DIV></DIV>Conclusion:
lua5.4 is faster, even doing a pointless loop.<BR></DIV>
<DIV class=gmail_extra><BR>-- <BR>
<DIV class=gmail_signature>Rodrigo Azevedo Moreira da
Silva<BR></DIV></DIV></DIV></DIV></DIV></DIV></BODY></HTML>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic