Re: FFI in interpreter mode

  • From: Evan Wies <evan@xxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 23 May 2012 09:21:28 -0400

I thought that's what -joff does? (75.3s vs 10.2s baseline) If there's a specific set of command-line arguments you want me to run, just let me know.


-Evan


On 05/23/2012 08:49 AM, Pierre-Yves Gérardy wrote:
Out of curiosity, could you test it with LuaFFI in interpreter mode?

-- Pierre-Yves


On Tue, May 22, 2012 at 11:29 PM, Evan Wies <evan@xxxxxxxxxxxxx <mailto:evan@xxxxxxxxxxxxx>> wrote:

    I just happened to try this out on a FFI-heavy program I'm working
    on.   It reads one large file of messages and writes each message
    to one of many (thousands) of files based on simple information in
    the message.  The file is 175M and contains 8.3 million messages.

    I just now ran it now once with different luajit options (on x64
    writing to SSD):
    none   10.2s
    -O3    10.1s
    -O2    29.5s
    -O1    29.4s
    -joff  75.3

This cool thing is that the C++ version of program runs in 8.0s! The LuaJIT FFI version is fresh meat and hasn't been optimized
    much -- amazing it is so close without much effort.

    -Evan


    On 05/22/2012 06:03 AM, Mike Pall wrote:

        Olivier Goudron wrote:

            I would like to know if the interpreter mode fallback for
            X86 CPU without
            SSE2 support allow FFI or not ?

        Yes.

        But please note that the FFI functionality is rather slow in
        interpreted mode. Should be ok for the occasional C call, though.

        --Mike





Other related posts: