lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Nov 14, 2018 at 4:34 AM Dibyendu Majumdar wrote:
>
> I'm expecting to find ravi-distro-0.5-windows-64bit.zip, but this file is missing.
>

Hi, this is now available.


OK, let's test it!

1)
A bug: correct Lua 5.3 program doesn't run on Ravi.
   C:\Software\ravi\bin>ravi -e"for x = 1, 2 do x = 42.0 end"
   ravi: (command line):1: Invalid assignment: integer expected near 'end'
 
2)
Ravi shows some warnings in JIT mode.  (Nevertheless, the program works correctly despite of the warnings)
   buffer:2113:1: warning: constant 4023233417 is so big it is long long
   buffer:2113:1: warning: decimal constant 4023233417 is between LONG_MAX and ULONG_MAX. For C99 that means long long, C90 compilers are very likely to produce unsigned long (and a warning) here
   buffer:2115:1: warning: constant 2562383102 is so big it is long long
   buffer:2115:1: warning: decimal constant 2562383102 is between LONG_MAX and ULONG_MAX. For C99 that means long long, C90 compilers are very likely to produce unsigned long (and a warning) here
   buffer:2119:1: warning: constant 3285377520 is so big it is long long
   buffer:2119:1: warning: decimal constant 3285377520 is between LONG_MAX and ULONG_MAX. For C99 that means long long, C90 compilers are very likely to produce unsigned long (and a warning) here
   buffer:2190:1: warning: constant 4294967296 is so big it is long long
   buffer:2370:1: warning: constant 4294967297 is so big it is long long
   buffer:2946:1: warning: constant 1099511627776 is so big it is long long
 
3)
Most frustrating problem: compiled functions run slower than not compiled (what am I doing wrong?).
Simple example (compiled function takes 28 seconds, non-compiled 13 seconds):
 
   C:\Software\ravi\bin>type program.lua
      local function f()
         local tm = os.clock()
         local o = 0
         for j = 1, 1e4 do
            local x = 0
            for k = 1, 1e5 do
               x = x ~ (j + k)
            end
            o = o | x
         end
         print("   Result = "..o)
         print("   CPU time = "..(os.clock() - tm))
      end
      print"Benchmarking non-compiled function"
      f()
      print"Compiling the function"
      assert(ravi.compile(f))
      print"Benchmarking compiled function"
      f()
 
   C:\Software\ravi\bin>ravi program.lua
      Benchmarking non-compiled function
         Result = 114656
         CPU time = 13.425
      Compiling the function
      Benchmarking compiled function
         Result = 114656
         CPU time = 28.568