Lua experiments on different apps

  • ChargedCreeper
    17th Feb 2019 Member 0 Permalink

    I decided to see if there was any difference in the speed of various Lua implementations, so I wrote a simple loop that runs for about 1 second and counts how many times the loop can run in that time.

     

    i=0 now=os.clock() while os.clock() < now + 1 do i = i + 1 end print(i)

    TPT: 10,923,792

    GMod (Chromium branch, and a ton of addons loaded): 11,922,030

    HexChat (x64, Windows): 20,557,857

    Browser Lua implementation (ran in latest Google Chrome): 252,807

     

    EDIT: Updated the GMod score due to finding it was not being executed in the same manner as the others, which deflated its score. It is more accurate now.

    Edited 3 times by ChargedCreeper. Last: 17th Feb 2019