|
On 05/01/2015 12:11, Roberto Ierusalimschy wrote:
OK. I managed to run my test suites with some GC testing. First I did the checks with both Lua 5.1 and 5.2 to have reference points, then used 5.3 with full 64bit support (i.e. as luaconf.h is out of the box).Does the introduction of integers slow the interpreter so much (it is the only architectural change I know of that could possibly affect so much the tests)? Since I got some compilation warnings (see another subthread) I tried to recompile with different TDM-GCC versions, but to no avail: lua 5.3 is a crawl compared to the previous versions.The use of 64-bit integers in 32-bit architectures may slow down the interpreter a little bit, for some programs, but nothing close to what you are relating. A difference from a couple of seconds to 3 minutes is completely unexpected. (In my machine, the worst cases are in the order of 10~20%, with several programs being not affected or running even faster.) -- Roberto
First of all I run the test suites in the same process and printed the value of collectgarbage 'count', with GC normally running:
Test suite results after run (Lua 5.1) 1 95 kB 0.005 s 2 148 kB 0.003 s 3 171 kB 0.003 s 4 212 kB 0 s 5 209 kB 0.008 s 6 234 kB 0.103 s 7 171 kB 0.01 s 8 188 kB 0.001 s 9 205 kB 0 s 10 295 kB 0.002 s 11 341 kB 0.052 s 12 361 kB 0.004 s 13 504 kB 1.66 s 14 526 kB 0.002 s 15 523 kB 0.013 s 16 628 kB 0.007 s 17 675 kB 0.051 s 18 573 kB 0.005 s 19 613 kB 0.001 s 20 357 kB 0.006 s 21 485 kB 0.002 s 22 537 kB 0.001 s 23 566 kB 1.29 s 24 605 kB 2.03 s 25 633 kB 0.001 s 26 718 kB 0.002 s 27 400 kB 0.002 s 28 585 kB 0.004 s 29 615 kB 0.001 s 30 646 kB 0 s 31 849 kB 0.006 s 32 698 kB 0.001 s 33 864 kB 0.008 s 34 937 kB 0.002 s 35 1049 kB 0.017 s 36 609 kB 0.005 s 37 859 kB 0.008 s 38 886 kB 0 s Test suite results after run (Lua 5.2) 1 106 kB 0.006 s 2 124 kB 0.007 s 3 112 kB 0.003 s 4 145 kB 0 s 5 289 kB 0.007 s 6 178 kB 0.194 s 7 150 kB 0.01 s 8 175 kB 0.001 s 9 190 kB 0 s 10 265 kB 0.006 s 11 317 kB 0.041 s 12 355 kB 0.002 s 13 393 kB 1.55 s 14 411 kB 0.002 s 15 671 kB 0.012 s 16 642 kB 0.008 s 17 681 kB 0.054 s 18 462 kB 0.007 s 19 495 kB 0.001 s 20 586 kB 0.017 s 21 687 kB 0.004 s 22 731 kB 0.002 s 23 766 kB 0.164 s 24 807 kB 1.18 s 25 837 kB 0.002 s 26 548 kB 0.002 s 27 407 kB 0.002 s 28 565 kB 0.003 s 29 641 kB 0.001 s 30 676 kB 0.001 s 31 862 kB 0.004 s 32 892 kB 0.001 s 33 644 kB 0.008 s 34 708 kB 0.002 s 35 837 kB 0.014 s 36 971 kB 0.026 s 37 1194 kB 0.007 s 38 1216 kB 0 s Test suite results after run (Lua 5.3) 1 130 kB 0.004 s 2 179 kB 0.002 s 3 1799 kB 12.8 s 4 1739 kB 12.6 s 5 2085 kB 0.023 s 6 1485 kB 13.3 s 7 1258 kB 12.3 s 8 1273 kB 0.001 s 9 1291 kB 0.001 s 10 991 kB 0.004 s 11 1027 kB 0.029 s 12 1836 kB 12.1 s 13 448 kB 2.25 s 14 466 kB 0.002 s 15 516 kB 0.052 s 16 1226 kB 12.4 s 17 1262 kB 0.058 s 18 1537 kB 0.007 s 19 1572 kB 0.001 s 20 1675 kB 0.01 s 21 1665 kB 12.5 s 22 1706 kB 0.001 s 23 1828 kB 11.5 s 24 2143 kB 12.6 s 25 2233 kB 12.1 s 26 2334 kB 0.005 s 27 2374 kB 0.002 s 28 2506 kB 0.004 s 29 2156 kB 11.9 s 30 2183 kB 0.002 s 31 1664 kB 11.3 s 32 1701 kB 0.001 s 33 2050 kB 0.01 s 34 2115 kB 0.002 s 35 2682 kB 11.3 s 36 2345 kB 11.8 s 37 1586 kB 11.5 s 38 1614 kB 0.001 s ================================================== After that I switched off the GC and retested again, with these results: Test suite results after run (Lua 5.1) 1 140 kB 0.002 s 2 249 kB 0.003 s 3 390 kB 0.002 s 4 430 kB 0.001 s 5 808 kB 0.008 s 6 989 kB 0.138 s 7 171 kB 0.02 s 8 188 kB 0.001 s 9 205 kB 0.001 s 10 295 kB 0.006 s 11 340 kB 0.039 s 12 552 kB 0.004 s 13 48553 kB 1.41 s 14 48574 kB 0.002 s 15 48894 kB 0.013 s 16 49285 kB 0.008 s 17 49332 kB 0.05 s 18 49625 kB 0.005 s 19 49664 kB 0 s 20 49776 kB 0.014 s 21 49903 kB 0.003 s 22 49954 kB 0.001 s 23 49983 kB 1.28 s 24 50022 kB 5.8 s 25 50049 kB 0.001 s 26 50134 kB 0.002 s 27 50184 kB 0.002 s 28 50364 kB 0.005 s 29 50393 kB 0.001 s 30 50424 kB 0.001 s 31 50634 kB 0.006 s 32 50671 kB 0.001 s 33 51042 kB 0.01 s 34 51114 kB 0.002 s 35 51226 kB 0.022 s 36 51392 kB 0.003 s 37 51642 kB 0.005 s 38 51668 kB 0.001 s Test suite results after run (Lua 5.2) 1 128 kB 0.002 s 2 217 kB 0.003 s 3 333 kB 0.002 s 4 367 kB 0.001 s 5 677 kB 0.006 s 6 958 kB 0.202 s 7 150 kB 0.009 s 8 176 kB 0.001 s 9 192 kB 0 s 10 268 kB 0.002 s 11 321 kB 0.014 s 12 360 kB 0.001 s 13 33342 kB 1.46 s 14 33361 kB 0.002 s 15 33628 kB 0.021 s 16 34029 kB 0.012 s 17 34068 kB 0.054 s 18 34340 kB 0.004 s 19 34374 kB 0.001 s 20 34466 kB 0.006 s 21 34567 kB 0.027 s 22 34612 kB 0.004 s 23 34646 kB 0.165 s 24 34688 kB 1.14 s 25 34711 kB 0.002 s 26 34790 kB 0.003 s 27 34832 kB 0.002 s 28 34982 kB 0.004 s 29 35059 kB 0.001 s 30 35095 kB 0 s 31 35281 kB 0.006 s 32 35312 kB 0.001 s 33 35618 kB 0.009 s 34 35681 kB 0.001 s 35 35811 kB 0.021 s 36 35945 kB 0.007 s 37 36174 kB 0.009 s 38 36196 kB 0.001 s Test suite results after run (Lua 5.3) 1 130 kB 0.003 s 2 220 kB 0.003 s 3 5793 kB 12.9 s 4 11133 kB 11.6 s 5 11482 kB 0.011 s 6 16742 kB 11.5 s 7 21948 kB 10.7 s 8 21963 kB 0.001 s 9 21981 kB 0 s 10 22064 kB 0.003 s 11 22101 kB 0.014 s 12 27384 kB 11.2 s 13 75745 kB 1.56 s 14 75762 kB 0.002 s 15 76059 kB 0.04 s 16 81583 kB 11.6 s 17 81618 kB 0.054 s 18 81892 kB 0.005 s 19 81928 kB 0.001 s 20 82031 kB 0.007 s 21 87325 kB 11.3 s 22 87365 kB 0.001 s 23 92589 kB 11.1 s 24 97757 kB 12 s 25 103052 kB 11.9 s 26 103153 kB 0.005 s 27 103192 kB 0.002 s 28 103323 kB 0.004 s 29 108490 kB 12 s 30 108516 kB 0.002 s 31 113789 kB 11.4 s 32 113826 kB 0.001 s 33 114175 kB 0.007 s 34 114239 kB 0.002 s 35 119419 kB 11.6 s 36 124690 kB 11.2 s 37 129945 kB 11.3 s 38 129973 kB 0.003 s ===========================================================I don't know if these results trigger something in your mind. It only seems that Lua 5.3 is eating more memory, but maybe this is a consequence of 64bit support.